Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Apr 16, 2021
1 parent 09f8c05 commit 9550785
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,10 +899,9 @@ def ages_timeseries(vaccines, area, cumulate=False):
# @st.cache(allow_output_mutation=True, show_spinner=False)
def plot_ages(vaccines, area):
if area == 'Italia':
ages = import_data.pd.read_csv(
import_data.os.path.join(import_data.BASE_PATH, 'covid19-opendata-vaccini/dati/anagrafica-vaccini-summary-latest.csv'),
index_col='fascia_anagrafica',
)
url = "https://raw.githubusercontent.com/italia/covid19-opendata-vaccini/master/dati/anagrafica-vaccini-summary-latest.csv"
s=requests.get(url).content
ages = import_data.pd.read_csv(io.StringIO(s.decode('utf-8')), index_col='fascia_anagrafica')
else:
vaccines_area = vaccines[vaccines.area == area]
ages = vaccines_area.groupby('fascia_anagrafica').sum()
Expand Down

0 comments on commit 9550785

Please sign in to comment.