Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Apr 16, 2021
1 parent bf4ac09 commit f4eec74
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions import_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,13 @@ def __init__(self, vaccines, deliveries, covid_data):
self.deliveries = process_data(deliveries, covid_data, date_label='data_consegna', deliveries=True)


def vaccines(repo_reference, covid_data):
vaccine_data = pd.read_csv(os.path.join(BASE_PATH, 'covid19-opendata-vaccini/dati/somministrazioni-vaccini-latest.csv'), index_col='data_somministrazione', parse_dates=['data_somministrazione'])
deliveries = pd.read_csv(os.path.join(BASE_PATH, 'covid19-opendata-vaccini/dati/consegne-vaccini-latest.csv'), index_col='data_consegna', parse_dates=['data_consegna'])
def vaccines(covid_data):
url = "https://raw.githubusercontent.com/italia/covid19-opendata-vaccini/master/dati/somministrazioni-vaccini-latest.csv"
s=requests.get(url).content
vaccine_data = pd.read_csv(io.StringIO(s.decode('utf-8')), index_col='data_somministrazione', parse_dates=['data_somministrazione'])
url = "https://raw.githubusercontent.com/italia/covid19-opendata-vaccini/master/dati/consegne-vaccini-latest.csv"
s=requests.get(url).content
deliveries = pd.read_csv(io.StringIO(s.decode('utf-8')), index_col='data_consegna', parse_dates=['data_consegna'])
return Vaccines(vaccine_data, deliveries, covid_data)


Expand Down

0 comments on commit f4eec74

Please sign in to comment.