bucky.model.graph
¶
Class to read and store all the data from the bucky input graph.
Module Contents¶
Classes¶
Contains and preprocesses all the data imported from an input graph file. |
Functions¶
|
Read an attribute from every node into a cupy/numpy array and optionally clip and/or diff it. |
|
scatter_add() thats cached by joblib. |
Attributes¶
- class bucky.model.graph.buckyGraphData(G, spline_smooth=True, force_diag_Aij=False)[source]¶
Contains and preprocesses all the data imported from an input graph file.
- N(self)¶
Total population.
- Nj(self)¶
Total population per adm2.
Notes
\[N_j = \sum_i N_{ij}\]- Returns
- Return type
numpy.ndarray
orcupy.ndarray
if using CuPy
- adm0_Ni(self)¶
Age stratified adm0 population.
- adm0_cum_case_hist(self)¶
Cumulative cases at adm0.
- adm0_cum_death_hist(self)¶
Cumulative deaths at adm0.
- adm0_inc_case_hist(self)¶
Incident cases at adm0.
- adm0_inc_death_hist(self)¶
Incident deaths at adm0.
- adm1_Nij(self)¶
Age stratified adm1 populations.
- adm1_Nj(self)¶
Total adm1 populations.
- adm1_cum_case_hist(self)¶
Cumulative cases by adm1.
- adm1_cum_death_hist(self)¶
Cumulative deaths by adm1.
- adm1_inc_case_hist(self)¶
Incident cases by adm1.
- adm1_inc_death_hist(self)¶
Incident deaths by adm1.
- static clean_historical_data(cum_case_hist, cum_death_hist, inc_hosp, start_date, g_data, force_save_plots=False)[source]¶
Preprocess the historical data to smooth it and remove outliers.
- rolling_adm1_curr_hosp(self)¶
Return the rolling mean of cumulative deaths.
- rolling_adm1_inc_hosp(self)¶
Return the rolling mean of cumulative deaths.
- rolling_cum_cases(self)¶
Return the rolling mean of cumulative cases.
- rolling_cum_deaths(self)¶
Return the rolling mean of cumulative deaths.
- rolling_inc_cases(self)¶
Return the rolling mean of incident cases.
- rolling_inc_deaths(self)¶
Return the rolling mean of incident deaths.