data_distributions#

Read in data distributions.

Functions

calculate_location_filename

Process a location filename.

calculate_location_filepath

Process a location filepath.

calculate_which_nbrackets_to_use

Calculate the number of age brackets to use by default.

get_census_age_brackets

Get census age brackets: depends on the country or source of the age distribution and the contact pattern data.

get_contact_matrices

Create a dict of setting specific age contact matrices.

get_contact_matrix

Get setting specific age contact matrix given sheet name to use.

get_default_school_size_distr_brackets

Define and return default school size distribution brackets.

get_default_school_size_distr_by_type

Define and return default school size distribution for each school type.

get_default_school_type_age_ranges

Define and return default school types and the age range for each.

get_default_school_types_by_age_single

Define and return default school type by age by assigning the school type with the highest probability.

get_default_school_types_distr_by_age

Define and return default probabilities of school type for each age.

get_employment_rates

Get employment rates by age.

get_head_age_brackets

Get a dictionary of head age brackets either from the file_path directly, or using the other parameters to figure out what the file_path should be.

get_head_age_by_size_distr

Create an array of head of household age bracket counts (column) given by size (row).

get_household_size_distr

A dictionary of the distribution of household sizes.

get_long_term_care_facility_resident_to_staff_ratios_brackets

Get size bins for the distribution of resident to staff ratios per facility for Long Term Care Facilities.

get_long_term_care_facility_resident_to_staff_ratios_distr

Get size distribution of resident to staff ratios per facility for Long Term Care Facilities.

get_long_term_care_facility_residents_distr

Get size distribution of residents per facility for Long Term Care Facilities.

get_long_term_care_facility_residents_distr_brackets

Get size bins for the distribution of residents per facility for Long Term Care Facilities.

get_long_term_care_facility_use_rates

Get Long Term Care Facility use rates by age for a state.

get_nbrackets

Return the default number of age brackets.

get_relative_path

Get the path relative for the datadir.

get_school_enrollment_rates

Get dictionary of enrollment rates by age.

get_school_size_brackets

Get school size brackets: depends on the source/location of the data.

get_school_size_distr_by_brackets

Get distribution of school sizes by size bracket or bin.

get_school_size_distr_by_type

Get the school size distribution by school types.

get_school_type_age_ranges

Get a dictionary of the school types and the age range for each for the location specified.

get_smoothed_single_year_age_distr

A smoothed dict of the age distribution by single years.

get_state_postal_code

Get the state postal code.

get_workplace_size_brackets

Get workplace size brackets.

get_workplace_size_distr_by_brackets

Get the distribution of workplace size by brackets.

load_location

Loading json object for the location data.

read_age_bracket_distr

A dict of the age distribution by age brackets.

sanitize_location

Process and return a valid name for a location.