bucky.model.graph

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

Module Contents

Classes

buckyGraphData

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

Functions

_read_node_attr(G, name, diff=False, dtype=float, a_min=None, a_max=None)

Read an attribute from every node into a cupy/numpy array and optionally clip and/or diff it.

class bucky.model.graph.buckyGraphData(G, sparse=True)[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

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

rolling_cum_cases(self)[source]

Return the rolling mean of cumulative cases.

rolling_cum_deaths(self)[source]

Return the rolling mean of cumulative deaths.

rolling_inc_cases(self)[source]

Return the rolling mean of incident cases.

rolling_inc_deaths(self)[source]

Return the rolling mean of incident deaths.

sum_adm1(self, adm2_arr)[source]

Return the adm1 sum of a variable defined at the adm2 level using the mapping on the graphi.

bucky.model.graph._read_node_attr(G, name, diff=False, dtype=float, a_min=None, a_max=None)[source]

Read an attribute from every node into a cupy/numpy array and optionally clip and/or diff it.