bucky.model.data#

Class to read and store all the data from the bucky input graph.

Module Contents#

Classes#

buckyData

Contains and preprocesses all the data imported from an input graph file.

Functions#

cached_scatter_add(a, slices, value)

scatter_add() thats cached by joblib.

read_population_tensor(file, return_adm2_ids=False, min_pop_per_bin=1.0)

Read in csv containing binned population data.

class bucky.model.data.buckyData(data_dir, fit_cfg, force_diag_Aij=False, hist_length=101, force_historical_end_dow=4, force_start_date=None)[source]#

Contains and preprocesses all the data imported from an input graph file.

N(self)[source]#

Total population.

Nj(self)[source]#

Total population per adm2.

Notes

\[N_j = \sum_i N_{ij}\]
Return type:

numpy.ndarray or cupy.ndarray if using CuPy

adm0_Ni(self)[source]#

Age stratified adm0 population.

adm0_cum_case_hist(self)[source]#

Cumulative cases at adm0.

adm0_cum_death_hist(self)[source]#

Cumulative deaths at adm0.

adm0_inc_case_hist(self)[source]#

Incident cases at adm0.

adm0_inc_death_hist(self)[source]#

Incident deaths at adm0.

adm1_Nij(self)[source]#

Age stratified adm1 populations.

adm1_Nj(self)[source]#

Total adm1 populations.

adm1_cum_case_hist(self)[source]#

Cumulative cases by adm1.

adm1_cum_death_hist(self)[source]#

Cumulative deaths by adm1.

adm1_inc_case_hist(self)[source]#

Incident cases by adm1.

adm1_inc_death_hist(self)[source]#

Incident deaths by adm1.

sum_adm1(self, adm2_arr, mask=None, cache=False)[source]#

DEPRECATED: Return the adm1 sum of a variable defined at the adm2 level using the mapping on the graph.

bucky.model.data.cached_scatter_add(a, slices, value)[source]#

scatter_add() thats cached by joblib.

bucky.model.data.read_population_tensor(file, return_adm2_ids=False, min_pop_per_bin=1.0)[source]#

Read in csv containing binned population data.