The goal is simple get as many historical data for the COVID-19 virus spread in the Netherlands. Currently only the "very sick" are being tested in the Netherlands. Not the ones with "minor symptoms".
If you have an idea please submit an issue!
Projects currently using this API/data:
Project | Description | URL | Repository |
---|---|---|---|
coronamap-nl | Map created for tracking the progress of the corona virus by codefor.nl | URL | codefornl/coronamap-nl |
This scraper will contact the RIVM website every 2 hours. But also every day at 14:30.
Currently it outputs in 3 formats.
- international-csv
- csv
- json
The RIVM csv is in has ;
delimiter. We convert this CSV into a "international" format. Which is with the ,
delimiter. You can find the ;
delimimter below.
Examples:
- Latest: /Municipalities/international-latest.csv
- Files: /Municipalities/international-csv/files.json
- Day 24 history: /Municipalities/international-csv/03-21-2020
- Day 24 at 08:00: /Municipalities/international-csv/03-21-2020/08:00:00.csv
- Day 24 latest: /Municipalities/international-csv/03-21-2020-latest.csv
The RIVM csv is in has ;
delimiter. This delimiter works with most tools but not all. Since in America they use a different delimiter: ,
Examples:
- Latest: /Municipalities/latest.csv
- Files: /Municipalities/csv/files.json
- Day 1: /Municipalities/csv/02-27-2020-latest.csv
- Day 24 history: /Municipalities/csv/03-21-2020
- Day 24 at 08:00: /Municipalities/csv/03-21-2020/08:00:00.csv
- Day 24 latest: /Municipalities/csv/03-21-2020-latest.csv
The RIVM csv converted to a JSON format.
Examples:
- Latest: /Municipalities/latest.json
- Files: /Municipalities/json/files.json
- Day 1: /Municipalities/json/02-27-2020-latest.json
- Day 24 history: /Municipalities/json/03-21-2020
- Day 24 at 08:00: /Municipalities/json/03-21-2020/08:00:00.json
- Day 24 latest: /Municipalities/json/03-21-2020-latest.json
Since we now have historical data for all of the municipalities we generate the progress of COVID-19 in the Netherlands.
Overview of the history of the COVID-19 numbers in the Netherlands as a whole. Every day at around 14:30 we generate a new file containing the latest information. You can view it live here:
Format | Link | Direct URL |
---|---|---|
JSON | View total-nl-latest.json on Github | API URL |
CSV | View total-nl-latest.csv on Github | API URL |
Overview of the history per municipality in the netherlands. Every day at around 14:30 we generate a new file containing the latest information. You can view it live here:
Format | Link | Direct URL |
---|---|---|
JSON | View municipality-history-latest.json on Github | API URL |
CSV | View municipality-history-latest.csv on Github | API URL |
As you can see over here we have lots of folders with a number. This number represents the municipality code.
Files in folder:
File | Description |
---|---|
{municipalityCode}/info.json | Information about the municipality |
{municipalityCode}/{municipalitySlug}.csv | CSV file containing history for the municipality |
{municipalityCode}/{municipalitySlug}.json | JSON file containing history for the municipality |
But how do you know what files or currently generated? We generate a files.json "index" file containing all of the municipalities with their respective information and location of the file.
Check it out here: /History/municipalities/files.json
Example contents:
[
{
"municipality": "Appingedam",
"population": 11721,
"municipalityNr": 3,
"csv": "3/appingedam.csv",
"csvLines": 26,
"json": "3/appingedam.json",
"jsonLength": 25
}
]
Example usage:
# Info about all of the available files
curl https://kapulara.github.io/COVID-19-NL/History/municipalities/files.json
# Information about the municipality
curl https://kapulara.github.io/COVID-19-NL/History/municipalities/3/info.json
# If we would like to get the JSON data
curl https://kapulara.github.io/COVID-19-NL/History/municipalities/3/appingedam.json
# If we would like to get the CSV data
curl https://kapulara.github.io/COVID-19-NL/History/municipalities/3/appingedam.csv
Currently everything is hosted on Github Pages.
The base url is: https://kapulara.github.io/COVID-19-NL/
Now if you would like to get the latest municipality information you just add /Municipalities/latest.json to that url.
All RAW url's in this document currently make use of that endpoint.
Keep in mind all of these are in format EPSG::28992 tried converting it with https://github.com/perliedman/reproject but no luck. The GeoJSON ended up in Norway.
- All NL municipalities /geo/municipalities-nl-2019.geojson
- All GGD Regions /geo/ggd-regions-2019.geojson
- NL /geo/nl-2019.geojson
I'm currently using Typescript, yarn and Node.js with NVM.
git clone https://github.com/Kapulara/COVID-19-NL.git
cd COVID-19-NL/
yarn
cp example-dev.env .env
yarn build:watch
After that open the folder with your favorite editor.
To start scraper yarn start
or if you would like to regenerate the historical data yarn start:historical