Commit 805eee4d authored by Luca Lista's avatar Luca Lista
Browse files

fixed vax vs incidence chart

parent 90d4b4f9
......@@ -694,6 +694,7 @@
" vax = vaccines.loc[region.replace('uli Ven', 'uli-Ven').replace('ino Alt', 'ino-Alt')].sort_index()[['prima_dose', 'seconda_dose']].rename_axis('data')\n",
" df = dat.merge(vax, how='inner', on='data')\n",
" df = df[df.prima_dose>0]\n",
" last_date = df.index.max()\n",
" pops = population.loc[population[\"Regione/Provincia\"]==region.replace('ia-Ro', 'ia Ro')]['Popolazione'].tolist()\n",
" if len(pops)>0: pop = pops[0]\n",
" else:\n",
......@@ -709,7 +710,7 @@
" vaxs.append(sel.vax.values[0])\n",
" incs.append(sel.totale_casi_giornalieri_somma2w_rel.values[0]*100000)\n",
" fig.add_trace(go.Scatter(x=vaxs, y=incs, mode = 'markers+text', textposition=\"middle right\", text=regs,\n",
" hovertemplate = '%{text}<br>percentuale seconda dose: %{x:.2%}<br>positivi, 14gg/100k ab.: %{y:.2f}',\n",
" hovertemplate = last_date+'<br>percentuale seconda dose: %{x:.2%}<br>positivi, 14gg/100k ab.: %{y:.2f}<extra>%{text}</extra>',\n",
" marker=dict(size=10, color=rainbow_colors), name='Attuale'))\n",
" add_logo(fig)\n",
" fig.update_layout(\n",
......@@ -732,8 +733,8 @@
" fig.write_image(file + \".pdf\", width=pdf_width, height=pdf_height)\n",
" return (\"plot_vax_inc\", \"success\")\n",
"batch_mode = True\n",
"#cfg = {}\n",
"#plot_vax_inc(cfg)"
"cfg = {}\n",
"plot_vax_inc(cfg)"
]
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment