get_smoothed_single_year_age_distr#
- get_smoothed_single_year_age_distr(datadir=None, location=None, state_location=None, country_location=None, nbrackets=None, file_path=None, use_default=False, window_length=7)[source]#
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 settings.location, settings.state_location, settings.country_location. 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 settings.location, settings.state_location, settings.country_location.
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.
- Return type:
dict