Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pas de donnés depuis 3 jours #570

Open
agathamichaeli1111 opened this issue Feb 28, 2021 · 3 comments
Open

Pas de donnés depuis 3 jours #570

agathamichaeli1111 opened this issue Feb 28, 2021 · 3 comments

Comments

@agathamichaeli1111
Copy link

Il n y a plus de donnés sur le nombre de cas confirmés par jour (dernier MAJ le 25 fevrier) @jdesboeufs

@eguidotti
Copy link

The same problem has been reported here. It seems not only confirmed cases are missing but the whole data from ministere-sante. I see the daily job has stopped on 19 Feb https://github.com/opencovid19-fr/data/tree/master/ministere-sante

Is there a possibility to fix this? Many thanks!

@payoto
Copy link
Contributor

payoto commented Mar 6, 2021

Je ne suis pas sur de quand le problème sera résolu mais en attendant le jeu de données est accessible sur data.gouv:

https://www.data.gouv.fr/fr/datasets/synthese-des-indicateurs-de-suivi-de-lepidemie-covid-19/

En attendant j'ai ce gist qui resout le probleme (en python):
https://gist.github.com/payoto/3f097222657dcc2fa856560b5897d7c5

@PowershellNinja
Copy link

Y a-t-il une mise à jour sur ce problème?
Merci @payoto pour votre solution, sur la base de laquelle j'ai pu mettre en place une workaround pour nous pour que nous ayons au moins les numéros de cas confirmes à nouveau:

from covid19dh import covid19
import requests
import pandas as pd

pdf, src = covid19(verbose=False)

column_renames = {
    "maille_code": "id",
    "conf": "confirmed",
}

#Download French Government Data to File
govFR_file = "data-gouv-fr-chiffres-cles.csv"
govFR_url = (
    "https://www.data.gouv.fr/fr/datasets/r/f335f9ea-86e3-4ffa-9684-93c009d5e617"
)

#Download File
file = requests.get(govFR_url)
with open(govFR_file, "wb") as f:
    f.write(file.content)
#Load csv into pandas
data_govFR = pd.read_csv(govFR_file)

#Rename Columns
data_govFR.rename(column_renames, axis="columns", inplace=True)

#Get Date for last valid reported case data on covid19dh
lastReportedValidDate = datetime.strptime("19-02-2021", "%d-%m-%Y")

#Convert date column to date
data_govFR["date"] = pd.to_datetime(data_govFR["date"])
#Get only rows where date is greated than the last date where valid data was available in covid19dh
data_govFR = data_govFR.loc[data_govFR["date"] > lastReportedValidDate]
#Filter out rows where confirmed is N/A
data_govFR = data_govFR.loc[~data_govFR["confirmed"].isna()]

#Copy values from French government dataset to covid19dh dataset
for currentDate in data_govFR["date"].dt.date.unique().tolist():
  pdf.loc[(pdf["id"]=="FRA") & (pdf["date"].dt.date == currentDate), "confirmed"] = data_govFR.loc[data_govFR["date"].dt.date == currentDate, "confirmed"].values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants