synthpops.data_distributions module

Read in data distributions.

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 brackets from

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_gender_fraction_by_age_path(datadir, location=None, state_location=None, country_location=None)

Get file_path for gender fractions by age bracket. This should only be used if the data is available.

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 gender fraction by age bracket data.

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

A dict of gender fractions by age bracket, either by location, state_location, country_location strings, or by the file_path if that’s given. 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 Seattle, WA. 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 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 fractions for two genders by age bracket.

synthpops.data_distributions.get_age_bracket_distr_path(datadir, location=None, state_location=None, country_location=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, file_path=None, use_default=False)

A dict of 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 Seattle, WA. 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 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 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 distributions of household sizes. If you don’t give the file_path, then supply the location and state_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 Seattle, WA. 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 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 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, state_location=None, country_location=None)

Get file_path for head of household age brackets. If data doesn’t exist at the state level, only give the country_location.

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_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, 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 Seattle, WA. 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

  • 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 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 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, 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

  • 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, 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 Seattle, WA. 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

  • 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 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 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, 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 (col) 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 Seattle, WA. 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

  • 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 gender by age bracket 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 Seattle, Washington.

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, state_location=None, country_location=None)

Get file_path for census age brackets: depends on the state or country of the source data on contact patterns.

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_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, state_location=None, country_location=None, file_path=None, use_default=False)

Get census age brackets: depends on the country or source of 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 Seattle, WA. 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

  • 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 gender by age bracket 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 Seattle, Washington.

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 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 gender by age bracket distribution data

  • 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 mixing 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 Seattle, WA. 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 (string) – file path to user specified gender by age bracket distribution data

  • 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_usa_school_enrollment_rates_df(datadir, locations, location, state_location, country_location, level)

Filters a dataframe on school enrollment rates in the US at the scale of county or PUMA down to relevant locations in the state. Specifying locations as a list allow the selection of multiple counties in the same state, in whatever combination desired.

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

  • locations (string or list) – name of locations to filter for, either as a string or a list of multiple locations

  • 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 here should always be ‘usa’

  • level (string) – name of the level at which the data are aggregated, in general ‘county’ but could also be ‘PUMA’

Returns

Pandas dataframe with school enrollment data in the US for at the scale of county of PUMA for specified locations within the same state.

Example usage:

locations = ‘King County, Washington’ for a single county

locations = [‘King County, Washington’, ‘Pierce County, Washington’] for multiple counties

synthpops.data_distributions.process_usa_school_enrollment_rates(datadir, locations, location, state_location, country_location, level)

Process US school enrollment rates at the county level for age groups and create a dictionary of rates for single year ages.

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

  • locations (string or list) – name of locations to filter for, either as a string or a list of multiple locations

  • 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 here should always be ‘usa’

  • level (string) – name of the level at which the data are aggregated, in general ‘county’ but could also be ‘PUMA’

Returns

A dictionary of enrollment rates by single year ages from 0 to 100.

synthpops.data_distributions.write_school_enrollment_rates(datadir, locations, location, state_location, country_location, level)

Write enrollment rates from age brackets into a file for single year ages.

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

  • locations (string or list) – name of locations to filter for, either as a string or a list of multiple locations

  • 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 here should always be ‘usa’

  • level (string) – name of the level at which the data are aggregated, in general ‘county’ but could also be ‘PUMA’

Returns

None

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 Seattle, WA. 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 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 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 Seattle, WA. 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 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 school size brackets.

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

Get file_path for school sizes 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 sizes.

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

Get pandas dataframe with school enrollment sizes: depends on the country or source of 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 Seattle, WA. 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 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 pandas dataframe with school sizes.

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, counts_available=False, file_path=None, use_default=False)

Get distribution of school sizes by bracket. Either you have enrollments by individual school or you have school size distribution that is binned. Either way, you want to get a school size distribution. 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 Seattle, WA. 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

  • counts_available (bool) – if True, a list of school sizes is available and a count of the sizes can be constructed

  • 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 the distribution of school sizes by bracket.

synthpops.data_distributions.write_school_size_distr_by_brackets(datadir, location=None, state_location=None, country_location=None, counts_available=True)

Write school size distribution by brackets to file.

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

  • counts_available (bool) – if True, a list of school sizes is available and a count of the sizes can be constructed

  • 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 school sizes by bracket.

synthpops.data_distributions.get_usa_school_sizes_by_bracket(datadir, location, state_location, country_location)

Get distribution of school sizes by bracket specifically for the US.

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’

  • size_distr_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 distribution of school sizes by bracket.

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 Seattle, WA. 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’

  • size_distr_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 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 Seattle, WA. 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’

  • size_distr_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 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.

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

  • size_distr_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 distribution of workplace sizes by bracket.

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

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

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

  • state_location (string) – name of the state

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

Returns

National Study of Long-Term Care Providers, 2015-2016’. Part 1 or 2 are available.

Return type

A file path to data on Long Term Care Facilities from ‘Long-Term Care Providers and Services Users in the United States - State Estimates Supplement

synthpops.data_distributions.get_usa_long_term_care_facility_data(datadir, state_location=None, part=None, file_path=None, use_default=False)
synthpops.data_distributions.get_usa_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_usa_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 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_usa_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_usa_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’

  • size_distr_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 size brackets or bins for residents per facility.

synthpops.data_distributions.get_usa_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_usa_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 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_usa_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 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 size bins for the distribution of resident to staff ratios per facility for Long Term Care Facilities.

synthpops.data_distributions.get_usa_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’

  • size_distr_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 size brackets or bins for resident to staff ratios per facility.