A bot created to scrape data related to COVID-19 daily from the Illinois Department of Public Health.
- In Google Sheets, have a spreadsheet that you want to use ready.
- In the link, find the id of the spreadsheet
- The id for https://docs.google.com/spreadsheets/d/1ofE0QnPLQu9fN387-_hq3RBmOkf3u4sPJVK72YYgJ2c/edit is
1ofE0QnPLQu9fN387-_hq3RBmOkf3u4sPJVK72YYgJ2c
- The id for https://docs.google.com/spreadsheets/d/1ofE0QnPLQu9fN387-_hq3RBmOkf3u4sPJVK72YYgJ2c/edit is
- Take that id, open the
Link
class, and set the value of the proper value to the id
- In the top left, go to
Select a project
, and thenNEW PROJECT
. - Click on the menu button on the left, select
APIs & Services
thenLibrary
. - In the search bar, search for
Google Sheets API
, click it, then selectEnable
. - In the menu, go to
APIs & Services
thenCredentials
. - Click
+ CREATE CREDENTIALS
, selectOAuth client ID
.- The
Application type
isDesktop app
. - Name it whatever you want.
- The
- When the client is created, download the json file, put it in the CoronaScraper folder, and save it as
credentials.json
.
- When running the project, the program needs to know where the credentials file is. There are two options for telling it where it is.
- In the command line, add the arguments
-c {location_of_credentials.json}
- Ex: >
CoronaScraper.exe -c {credentials_file.json}
- Ex: >
- In the project, add the credentials to the project resources.
- In Visual Studio, click on
Project
, thenCoronaScraper Properties
. - Click on
Resources
, click on the dropdown next toStrings
, switch it toFiles
. - Click
Add Resource
,Add Existing File
, find your credentials file and select it. - Rename the resource to
credentials
- In Visual Studio, click on
- In the command line, add the arguments
- General
- Age/Race Correlated Data
- Vaccination Data
- The Illinois Department of Public Health does not update data on weekends and federal holidays.
- Users cannot edit the data in my spreadsheets, do not use those ids for the links