synthpops.data_distributions module

Read in data distributions.

synthpops.data_distributions.get_relative_path(datadir)
synthpops.data_distributions.get_nbrackets()
synthpops.data_distributions.get_age_brackets_from_df(ab_file_path)

Create a dict of age bracket ranges from ab_file_path.

Parameters
  • ab_file_path (string) – file path to get the ends of different age

  • from (brackets) –

Returns

A dictionary with a np.ndarray of the age range that maps to each age bracket key.

Examples:

get_age_brackets_from_df(ab_file_path) returns a dictionary
age_brackets, where age_brackets[0] is the age range for the first age
bracket, age_brackets[1] is the age range for the second age bracket,
etc.
synthpops.data_distributions.get_age_bracket_distr_path(datadir, location=None, state_location=None, country_location=None, nbrackets=None)

Get file_path for age distribution by age brackets.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to the age distribution by age bracket data.

synthpops.data_distributions.read_age_bracket_distr(datadir, location=None, state_location=None, country_location=None, nbrackets=None, file_path=None, use_default=False)

A dict of the age distribution by age brackets. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified age bracket distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from the default_location, default_state, default_country.

Returns

A dictionary of the age distribution by age bracket. Keys map to a range of ages in that age bracket.

synthpops.data_distributions.get_smoothed_single_year_age_distr(datadir, location=None, state_location=None, country_location=None, nbrackets=None, file_path=None, use_default=None, window_length=7)

A smoothed dict of the age distribution by single years. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population. Using moving windows to smooth out the age distribution.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified age bracket distribution data

  • use_default (bool) – If True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from the default_location, default_state, default_country.

  • window_length (int) – length of window, in units of years, over which to average or smooth out age distribution

Returns

A dictionary of the age distribution by age bracket. Keys map to a range of ages in that age bracket.

synthpops.data_distributions.get_household_size_distr_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for household size distribution.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to the household size distribution data.

synthpops.data_distributions.get_household_size_distr(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

A dictionary of the distribution of household sizes. If you don’t give the file_path, then supply the location, state_location, and country_location strings. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified household size distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of the household size distribution data. Keys map to the household size as an integer, values are the percent of households of that size.

synthpops.data_distributions.get_head_age_brackets_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for head of household age brackets.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state_location is in

Returns

A file path to the age brackets for head of household distribution data.

synthpops.data_distributions.get_head_age_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

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. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state_location is in

  • file_path (string) – file path to user specified head age brackets data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from the default_location, default_state, default_country.

Returns

A dictionary of the age brackets for head of household distribution data. Keys map to the age bracket as an integer, values are the percent of households which head of household in that age bracket.

synthpops.data_distributions.get_household_head_age_by_size_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for head of household age by size counts or distribution. If the data doesn’t exist at the state level, only give the country_location.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state_location is in

Returns

A file path to the head of household age by household size count or distribution data.

synthpops.data_distributions.get_household_head_age_by_size_df(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

Return a pandas df of head of household age by the size of the household. If the file_path is given return from there first. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state_location is in

  • file_path (string) – file path to user specified data for the age of the head of the household by household size

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from the default_location, default_state, default_country.

Returns

A file path to the head of household age by household size count or distribution data.

synthpops.data_distributions.get_head_age_by_size_distr(datadir, location=None, state_location=None, country_location=None, file_path=None, household_size_1_included=False, use_default=False)

Create an array of head of household age bracket counts (column) given by size (row). If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from the default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state_location is in

  • file_path (string) – file path to user specified age of the head of the household by household size distribution data

  • household_size_1_included – if True, age distribution for who lives alone is included in the head of household age by household size dataframe, so it will be used. Else, assume a uniform distribution for this among all ages of adults.

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

An array where each row s represents the age distribution of the head of households for households of size s-1.

synthpops.data_distributions.get_census_age_brackets_path(datadir, location=None, state_location=None, country_location=None, nbrackets=None)

Get file_path for census age brackets: will depend on the state or country of the source data on the age distribution and age specific contact patterns.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state_location is in

Returns

A file path to the age brackets to be used with census age data in combination with the contact matrix data.

synthpops.data_distributions.get_census_age_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False, nbrackets=None)

Get census age brackets: depends on the country or source of the age distribution and the contact pattern data. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state_location is in

  • file_path (string) – file path to user specified census age brackets

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of the range of ages that map to each age bracket.

synthpops.data_distributions.get_contact_matrix(datadir, setting_code, sheet_name=None, file_path=None, delimiter=' ', header=None)

Get setting specific age contact matrix given sheet name to use. If file_path is given, then delimiter and header should also be specified.

Parameters
  • datadir (string) – file path to the data directory

  • setting_code (string) – name of the physial contact setting: H for households, S for schools, W for workplaces, C for community or other

  • sheet_name (string) – name of the sheet in the excel file with contact patterns

  • file_path (string) – file path to user specified age contact matrix

  • delimiter (string) – delimter for the contact matrix file

  • header (int) – row number for the header of the file

Returns

Matrix of contact patterns where each row i is the average contact patterns for an individual in age bracket i and the columns represent the age brackets of their contacts. The matrix element i,j is then the contact rate, number, or frequency for the average individual in age bracket i with all of their contacts in age bracket j in that physical contact setting.

synthpops.data_distributions.get_contact_matrix_dic(datadir, sheet_name=None, file_path_dic=None, delimiter=' ', header=None, use_default=False)

Create a dict of setting specific age contact matrices. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • setting_code (string) – name of the physial contact setting: H for households, S for schools, W for workplaces, C for community or other

  • sheet_name (string) – name of the sheet in the excel file with contact patterns

  • file_path_dic (string) – dictionary to file paths of user specified age contact matrix, where keys are “H”, “S”, “W”, and “C”.

  • delimiter (string) – delimter for the contact matrix file

  • header (int) – row number for the header of the file

Returns

A dictionary of the different contact matrices for each population, given by the sheet name. Keys map to the different possible physical contact settings for which data are available.

synthpops.data_distributions.get_school_enrollment_rates_path(datadir, location=None, state_location=None, country_location=None)

Get a file_path for enrollment rates by age.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to the school enrollment rates.

synthpops.data_distributions.get_school_enrollment_rates(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

Get dictionary of enrollment rates by age. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified school enrollment by age data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of school enrollment rates by age.

synthpops.data_distributions.get_school_size_brackets_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for school size brackets specific to the location under study.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to school size brackets.

synthpops.data_distributions.get_school_size_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

Get school size brackets: depends on the source/location of the data. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified school size brackets data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of school size brackets.

synthpops.data_distributions.get_school_size_distr_by_brackets_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for the distribution of school size by brackets.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to the distribution of school sizes by bracket.

synthpops.data_distributions.get_school_size_distr_by_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

Get distribution of school sizes by size bracket or bin. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified school size distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of the distribution of school sizes by bracket.

synthpops.data_distributions.get_default_school_type_age_ranges()

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

Returns

A dictionary of default school types and the age range for each.

synthpops.data_distributions.get_default_school_types_distr_by_age()

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

Returns

A dictionary of default probabilities for the school type likely for each age.

synthpops.data_distributions.get_default_school_types_by_age_single()

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

Returns

A dictionary of default school type by age.

synthpops.data_distributions.get_default_school_size_distr_brackets()

Define and return default school size distribution brackets.

Returns

A dictionary of school size brackets.

synthpops.data_distributions.get_default_school_size_distr_by_type()

Define and return default school size distribution for each school type. The school size distributions are binned to size groups or brackets.

Returns

A dictionary of school size distributions binned by size groups or brackets for each type of default school.

synthpops.data_distributions.write_school_type_age_ranges(datadir, location, state_location, country_location, school_type_age_ranges)

Write to file the age range for each school type.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • school_type_age_ranges (dict) – a dictionary with the age range for each school type

Returns

None.

synthpops.data_distributions.get_school_type_age_ranges_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for the age range by school type.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to the age range for different school types.

synthpops.data_distributions.get_school_type_age_ranges(datadir, location, state_location, country_location, file_path=None, use_default=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A dictionary of default school types and the age range for each.

synthpops.data_distributions.get_school_size_distr_by_type_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for the school size distribution by school type.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to the school size distribution data by different school types for the region specified.

Return type

str

synthpops.data_distributions.get_school_size_distr_by_type(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=None)

Get the school size distribution by school types. If use_default, then we’ll try to look for location specific data first, and if that’s not available we’ll use default data from the set default locations (see sp.config.py). This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in, which should be the ‘usa’

  • file_path (string) – file path to user specified distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A dictionary of school size distributions binned by size groups or brackets for each type of default school.

synthpops.data_distributions.get_employment_rates_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for employment rates by age.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to employment rates by age.

synthpops.data_distributions.get_employment_rates(datadir, location, state_location, country_location, file_path=None, use_default=False)

Get employment rates by age. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in, which should be the ‘usa’

  • file_path (string) – file path to user specified employment by age data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of employment rates by age.

synthpops.data_distributions.get_workplace_size_brackets_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for workplace size brackets.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to workplace size brackets.

synthpops.data_distributions.get_workplace_size_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

Get workplace size brackets. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in, which should be the ‘usa’

  • file_path (string) – file path to user specified workplace size brackets data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of workplace size brackets.

synthpops.data_distributions.get_workplace_size_distr_by_brackets_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for the distribution of workplace size by brackets.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to the distribution of workplace sizes by bracket.

synthpops.data_distributions.get_workplace_size_distr_by_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=False)

Get the distribution of workplace size by brackets. If use_default, then we’ll first try to look for location specific data and if that’s not available we’ll use default data from default_location, default_state, default_country. This may not be appropriate for the population under study so it’s best to provide as much data as you can for the specific population.

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified workplace size distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from default_location, default_state, default_country.

Returns

A dictionary of the distribution of workplace sizes by bracket.

synthpops.data_distributions.get_state_postal_code(state_location, country_location)

Get the state postal code.

Parameters
  • state_location (string) – name of the state

  • country_location (string) – name of the country the state is in

Returns

A postal code for the state_location.

Return type

str

synthpops.data_distributions.get_usa_long_term_care_facility_path(datadir, state_location=None, country_location=None, part=None)

Get file_path for state level data on Long Term Care Providers for the US from 2015-2016.

Parameters
  • datadir (string) – file path to the data directory

  • state_location (string) – name of the state

  • country_location (string) – name of the country the state is in

  • part (int) – part 1 or 2 of the table

Returns

A file path to data on Long Term Care Providers from ‘Long-Term Care Providers and Services Users in the United States - State Estimates Supplement: National Study of Long-Term Care Providers, 2015-2016’. Part 1 or 2 are available.

Return type

str

synthpops.data_distributions.get_usa_long_term_care_facility_data(datadir, state_location=None, country_location=None, part=None, file_path=None, use_default=False)

Get state level data table from National survey on Long Term Care Providers for the US from 2015-2016.

Parameters
  • datadir (string) – file path to the data directory

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • part (int) – part 1 or 2 of the table

  • file_path (string) – file path to user specified LTCF distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A file path to data on the size distribution of residents per facility for Long Term Care Facilities.

Return type

str

synthpops.data_distributions.get_long_term_care_facility_residents_path(datadir, location=None, state_location=None, country_location=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to data on the size distribution of residents per facility for Long Term Care Facilities.

synthpops.data_distributions.get_long_term_care_facility_residents_distr(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified LTCF resident size distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A dictionary of the distribution of residents per facility for Long Term Care Facilities.

synthpops.data_distributions.get_long_term_care_facility_residents_distr_brackets_path(datadir, location=None, state_location=None, country_location=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to data on the size bins for the distribution of residents per facility for Long Term Care Facilities.

synthpops.data_distributions.get_long_term_care_facility_residents_distr_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in, which should be the ‘usa’

  • file_path (string) – file path to user specified LTCF resident size brackets data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A dictionary of size brackets or bins for residents per facility.

synthpops.data_distributions.get_long_term_care_facility_resident_to_staff_ratios_path(datadir, location=None, state_location=None, country_location=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to data on the distribution of resident to staff ratios per facility for Long Term Care Facilities.

synthpops.data_distributions.get_long_term_care_facility_resident_to_staff_ratios_distr(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

  • file_path (string) – file path to user specified resident to staff ratio distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A dictionary of the distribution of residents per facility for Long Term Care Facilities.

synthpops.data_distributions.get_long_term_care_facility_resident_to_staff_ratios_brackets_path(datadir, location=None, state_location=None, country_location=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in

Returns

A file path to data on the size bins for the distribution of resident to staff ratios per facility for Long Term Care Facilities.

Return type

str

synthpops.data_distributions.get_long_term_care_facility_resident_to_staff_ratios_brackets(datadir, location=None, state_location=None, country_location=None, file_path=None, use_default=None)

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

Parameters
  • datadir (string) – file path to the data directory

  • location (string) – name of the location

  • state_location (string) – name of the state the location is in

  • country_location (string) – name of the country the location is in, which should be the ‘usa’

  • file_path (string) – file path to user specified resident to staff ratio brackets data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A dictionary of size brackets or bins for resident to staff ratios per facility.

synthpops.data_distributions.get_long_term_care_facility_use_rates_path(datadir, state_location=None, country_location=None)

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

Parameters
  • datadir (str) – file path to the data directory

  • location_alias (str) – more commonly known name of the location

  • state_location (str) – name of the state the location is in

  • country_location (str) – name of the country the location is in

Returns

A file path to the data on the Long Term Care Facility usage rates by age.

Return type

str

Note

Currently only available for the United States.

synthpops.data_distributions.get_long_term_care_facility_use_rates(datadir, state_location=None, country_location=None, file_path=None, use_default=None)

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

Parameters
  • datadir (str) – file path to the data directory

  • location_alias (str) – more commonly known name of the location

  • state_location (str) – name of the state the location is in

  • country_location (str) – name of the country the location is in

  • file_path (string) – file path to user specified gender by age bracket distribution data

  • use_default (bool) – if True, try to first use the other parameters to find data specific to the location under study, otherwise returns default data drawing from Seattle, Washington.

Returns

A dictionary of the Long Term Care Facility usage rates by age.

Return type

dict

Note

Currently only available for the United States.