Like all of us, we've been observing the spread of Coronavirus (COVID-19) with great concern. Our thoughts are with everyone affected, and we are grateful to all the health workers and public safety officials who allow us to survive.
Scrape COVID-19 statistics.
The most obvious way to check out the latest data on Coronavirus is to visit official websites devoted to COVID-19 statistics. But they don't provide easily consumable APIs, however.
To obtain actual Coronavirus information about tested and infected people in multiple countries, follow some simple steps covered in this paper.
We are going to use DFK Scraper to do the job.
To save your time and efforts, we've already prepared a payload that contains rules to get all COVID-19 cases by countries. So you don't have to select fields to be extracted manually. You could customize it, however.
Import payload file
Download the following JSON file to your local computer. Then Click "Import collection from file" button and choose just downloaded payload to feed the scraper.
TODO: We will make our life even more comfortable when implementing New feature to Import payload file directly from URL :)
Here is the content of the JSON payload file.
Right after importing payload, you can see a full web page specified in the "Request URL" parameter.
Try clicking on different fields to see selected items according to corresponded patterns.
Press the "Preview" button. Depending on the chosen format, you can see extracted data either as a table or JSON formatted view.
Preview mode limits the output to 100 records. You have to register to get full datasets.
Registration is quick and easy and 100% FREE! You have to register to get access to the dashboard. The dashboard serves to control your tasks and download result datasets. Click on the "Log in" button to register with your Facebook or Google account. Or press the "Sign Up" button to register with your email.
Once you register, we grant you free 1000 credits.
Now, as a registered user, you can create and launch tasks.
Return to the Web scraper page, and import downloaded payload. Then press the "Preview" tab button.
Notice that now you can see your user information and credits balance information in the main menu top bar.
Click the "Create task" button to launch a new task from the dashboard.
Run the task.
The name of your task created recently is "COVID-19".
Click the green "Run" button to start the process.
Once after a task successfully finished, you can download results to your local computer in CSV or JSON format. Next, upload them directly to Google Drive, Dropbox, or Microsoft Onedrive.
Third-party applications and services such as Widgets, Informers, Telegram bots, APIs, or Research Studies can easily consume CSV or JSON data.
We are Here For You.
We are always working from home full-time, and since we used to communicate remotely within our team. So it is not a big deal for us to follow the "Stay At Home" challenge.
All services in our cloud run without any manual intervention. On the other side, our staff are fully operational during the Coronavirus pandemic and deliver full service to our customers.
Feel free to contact us to get free credits for COVID-19 related projects.
We've created a public GitHub repository to push our code dedicated to gathering, processing info about Coronavirus(COVID-19).
We are going to consider the next issues in our future blog posts:
At the end of the third part we have an informer like the one shown below:
Stay safe and be well. We wish you all the best as you continue to adjust to these unprecedented circumstances.
And if we can help, please let us know.