Comments (3)
Here's another method to extract this data from the coronadashboard datablob. This is probably more reliable than extracting it from the rivm website.
import zipfile
import json
from io import BytesIO
import datetime
dashboard_datablob = 'https://coronadashboard.rijksoverheid.nl/latest-data.zip'
r = requests.get(dashboard_datablob, stream=True)
z = zipfile.ZipFile(BytesIO(r.content))
with z.open('json/NL.json') as fh:
nl = json.load(fh)
rows = []
for week in nl['ggd']['values']:
rows.append({
'year-week': datetime.datetime.fromtimestamp(int(week['week_end_unix'])).strftime('%Y-%U'),
'tested_pos': week['infected'],
'tested_total': week['tested_total'],
'percent_pos': week['infected_percentage'],
})
pd.DataFrame(rows).set_index('year-week')```
from coronawatchnl.
Great scripts! It might be a good idea to make a new dataset with these test counts because it differs from GGD and virologische dagstaten (dataset 3...). RIVM is about to publish two new open datasets this week. As far as I know, a dataset with test counts isn't among them.
Hopefully, I can find some time to work on this tomorrow.
from coronawatchnl.
Very interesting, many thanks, I did not know about the coronadashboard.rijksoverheid.nl/latest-data.zip yet!
from coronawatchnl.
Related Issues (20)
- Contagious data not up to date HOT 4
- Extract Settings data from report to JSON HOT 2
- Ziekenhuisopname empty in RIVM data HOT 4
- Information on infection count in healthcare workers
- Number of tests performed in RIVM report
- R package and new datasets
- Slight differences between case count datasets
- Total number of tests per week deviates from sources HOT 5
- Negative values municipal dataset for number of diagnosed/hospitalized/deceased cases
- LCPS now publishes a CSV with it's data HOT 2
- data-geo no longer updating HOT 1
- RIVM_NL_age_distribution no longer updating since 09-12-2020
- RIVM_NL_test_latest wrong data starting on 2020-12-14
- Vaccination data from dashboard HOT 1
- Missing data municipalities
- Weekly corona-test numbers have stopped
- National data doubled
- National data incomplete
- Missing municipality Eemsdelta
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coronawatchnl.