Mar 29, 2020

Work with Covid 19 Case Data (Windows)

Creating a new article via the Article Creator

New page

This article is focus on Windows, a separate tutorial is available for macOSThe data repository is downloaded as .csv files, a spreadsheet application will be needed

== Steps ==
=== Downloading CoViD-19 Data ===
# Install the latest version of Git for PC - installation promptsrestart machine after installation
# Click the search bar in the lower left hand of your screen and type run, click "command prompt" from the list of app results to launch the application, enter the following commandgit --version (git space dash dash version) press enterif it returns your version of git, such as git version 2.26.0 the install was successful.
# Remaining in the command prompt, your default directory should be your username. To naviage to your documents folder enter the following commandscd document (press enter)
# Now we will use the clone command to download the data repository.  The data will be saved within the directory the command is executed, in this case your documents folder.  Enter the following command and press entergit clone
# The repository has now been saved within your documents folder of your user directory.  For example my user name is vogtc, the data would be found at c:/users/vogtc/documents/covid-19
# You now have the most up to date data and may navigate to the COVID-19 folder and begin working with the files.  The data is available as daily reports as well as a time series. The most prudent data is found in the csse_covid_19_data folder.  You can also find daily situation reports from the World Health Organization in the who_covid_19_situation_reports folder.

=== Keeping Your Data Up To Date ===
# If you want your data to remain current you must choose to either manually or automatically update your files. To do this we will use the git pull origina command within the Covid-19 directory.  Open the command prompt as in step 2 above and enter the following commandscd documents/covid-19 (press enter)git pull origin (press enter)
# After executing these commands you will be informed that your data is either already up to date, or the new data will begin downloading, if at any time you get an error that says "failed to resolve host" simply repeat the commands, if the problem persists check your internet connection
# If at any time you receive the error "fatal: not a git repository" it is because you are not in the correct directory.  Type the following command instead to update your files, remember to replace yourUserName before executing the commandgit -C /users/yourUserName/documents/covid-19 pullfor example my username is vogtc, my command looks like thisgit -C /users/vogtc/documents/covid-19 pull
# If your repository is in a different location simply enter that path in place of the above.  An easy way to do this is to open a file explorer window and navigate to the Covid-19 folder but do not open it.  In the command prompt type git -C (remember to add a space after -C) then drage the covid-19 folder into the command prompt window and release, this will copy the file path, type pull and press enter
# If you would like to stop here you may manually repeat the update process daily, the files are updated at 23:59 UTC which is 7:79pm EST, a simple google search for 23:59pm will result your correct local time.  If you feel confident following the instructions and would like to automate your update please proceed below

=== How To Automate Your Updates ===
# Select the search bar in the lower left hand of your screen and type notepad, click the app result to launch the application.
# In the new document type the following (remember to replace your username) @echo off (enter twice) git -C /users/yourUserName/documents/covid-19 pull
# Select File, save, select documents in the left hand window then double click the covid-19 folder
# In the file name field name your file covidscript.cmd and select save
# The data is updated at 23:59 UTC, you will need to know what time this is in your local time zone, a simple Google search for 23:59 UTC will result in the proper time, 7:59pm EST, 6:59pm CST, 5:59pm MT, 4:59pm PST etc.
# Select the search bar in the lower left hand of your screen and type "task scheduler" click the app result to launch the application
# On the right hand side of the window select Create Task...
# Under the General tab name your task Covid19 Update, under description write git pull for Covid19 data repository
# Select the Triggers tab, click New...,under the drop down next to "Begin the task" select "on a schedule"
# Select the radial button next to "Daily", set the time for your local time as compared to 23:59 UTC plus a few minutes, I have mine set to 8:05pm EST.
# Click OK, select the Actions tab, on the bottom left of the winow select New...
# Next to action, "start program" should be selected.  Click Browse..., in the left window select documents, double click the Covid-19 folde, select covidscript.cmd, click open, click ok
# Select the Conditions tab, under power, deselct the check box next to "start the task only if the computer is on AC power"
# Select the Settings tab, check the box next to "Run task as soon as possible after a scheduled start is missed"
# Check the box next to "If the task fails, restart ever", set to 1 minute, set "attempt to restart" up to 3 times. Select OK
# You're Done! You have successfully downloaded the CoViD-19 Data Repository and have automated its updates.  When you wish to delete this task simply return to task scheduler and select task scheduler library in the left window, select CoViD-19 Update in the center window, select Delete in the lower serciton of the right hand window.


from wikiHow - Recent Changes [en]

No comments:

Post a Comment