There are a few methods to achieve this but I go with using the built in venv module in Python. Next is create a virtual environment in that project folder. I've called the folder wifi_speed_test and its full path is: C:\Users\richy\git_projects\wifi_speed_test. Getting Startedīefore looking at the Python file, first thing you'll want to do is decide where your project folder is going to be located which will store the Python file and the resulting CSV files. The difference here is you can schedule when the test is run and the results are automatically stored in a CSV file for you. When you run the code, behind the scenes it is essentially running a speed test just like you would by pressing 'GO' on the webpage. The Python file we'll be going thought can be found on Github. Reason being is there are many benefits to partitioning data when you start working on large data projects such as improved scalability, performance, data storage flexibility etc. For such a small dataset this partitioning of the data by day in not necessary, but the practice of partitioning is useful to become comfortable with. The code as it currently is will output data into separate CSV files for each day it is ran. All terminal code will be Linux BASH commands. I talk about the possibility of running speed tests whilst you're logged off or when your computer is in sleep or hibernate mode under the " Task Scheduler Task Action" section of this article. This project will allow you to carry out speed tests in the background whilst your computer is on and you're logged in. To add a BASH terminal to vscode, download the Git BASH tool as described here. Since most of the worlds servers run on the Linux OS, it's handy to learn its command line language BASH (aka Linux commands) so I use a BASH terminal whilst in VS code. Windows Command Prompt and Powershell are the default terminals that come with VS code. Microsoft has documentation on how to download both. You need to download Python and a suitable text editor or integrated development environment (IDE) - I use Microsoft's Visual Studio Code (VS Code) - so you can write the program. Be on a Windows PC so you can use Task Scheduler (crontab is a Mac alternative).To download Python and an IDE (I use Visual Studio Code vscode).In order to follow this project you need: Also, if you are suffering from regular drop outs, it's handy to know that ISPs have a guaranteed minimum speed they have to provide you with and if they don't resolve it you can either receive compensation or leave the contract penalty-free. I thought this project could serve as a Data Engineering project where you'll learn how to set up a virtual environment to contain your third party Python modules, retrieve data from, clean, transform and store that data into partitioned CSV files and then use a scheduler to automate the whole process. The goal was to create a simple program that would automatically test my internet speed regularly throughout the day, for as many days as I desired, and store the results in CSV files so I could send them to my ISP as proof of a slow internet connection. Having slow internet speeds whilst working from home and receiving not much more than a 'turn it off and on' as a solution from my internet service provider (ISP) motivated me to create this program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |