Created
April 28, 2020 19:13
-
-
Save neurodroid/8e35bf57fa98cf808b39b336d3fd0392 to your computer and use it in GitHub Desktop.
COVID-19 testing in France (only "laboratoire de ville")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Sources: | |
https://www.data.gouv.fr/fr/datasets/donnees-relatives-aux-tests-de-depistage-de-covid-19-realises-en-laboratoire-de-ville/ | |
""" | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
covid_test_url = "https://www.data.gouv.fr/fr/datasets/r/b4ea7b4b-b7d1-4885-a099-71852291ff20" | |
covid_test_csv = pd.read_csv((covid_test_url), sep=";", index_col=1, parse_dates=True,) | |
df = covid_test_csv[covid_test_csv['clage_covid']=='0'].resample('D').sum() | |
df['ratio'] = df['nb_pos']/df['nb_test'] | |
ax = df.plot(y='nb_test', label='no_tests') | |
df.plot(y='nb_pos', ax=ax, label='no_pos') | |
df.plot(y='ratio', secondary_y=True, ax=ax, label='ratio') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment