# Finalize plot title = f'Covidgevallen per 100k per week t/m {date_end.strftime("%Y-%m-%d")}' ax.set_title(f'{title}\nGemeentes met {pop_range[0]/1e3:.0f}k-{pop_range[1]/1e3:.0f}k inwoners.') fig.canvas.set_window_title(title) df_renamed = dfm_wc[['HHsize', 'Maandelijks%', 'WeeklyPer100k']].copy() df_renamed.rename(columns={'HHsize': 'HHgrootte', 'Maandelijks%':'Religieus%', 'WeeklyPer100k':'CovidGevallen'}, inplace=True) df_renamed['LogReligieus'] = np.log10(df_renamed['Religieus%']) corr = df_renamed.corr() print(f'Correlation matrix:\n{np.around(corr, 2)}') fig.show() return dfm_wc, date_end if __name__ == '__main__': nlcs.reset_plots() nlcs.init_data(autoupdate=True) plot_hhsize_relig_cases(pop_range=(0, 100e3)) plot_hhsize_relig_cases(ref_date='2020-11-20', pop_range=(0, 100e3)) # plot_trends_by_religious_visits(ndays=80, maxpop=30e3)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Get DoW corrections for daily case numbers. Created on Tue Dec 29 20:00:21 2020 @hk_nien """ import numpy as np import pandas as pd import matplotlib.pyplot as plt import nlcovidstats as nlcs if __name__ == '__main__': nlcs.init_data() plt.close('all') get_dow_correction((-100, -1), True)