PopulationByAge
self, age_range_start, age_range_end) adrio.acs5.PopulationByAge(
Processes a population-by-age table to extract the population of a specified age bracket, as limited by the age brackets defined by the US Census ACS 5-Year Data (group B01001). This ADRIO does not fetch data on its own, but requires you to provide another attribute named “population_by_age_table” for it to parse. Most often, this will be provided by a PopulationByAgeTable
instance. This allows the table to be reused in case you need to calculate more than one population bracket (as is common in a multi-strata model).
The result is an N-shaped array of integers.
Parameters
Raises
Name | Type | Description |
---|---|---|
ValueError | If the given age range does not line up with those ranges which are available in the source data. For instance, the Census defines an age bracket of 20-to-24 years. This makes it impossible for 21, 22, or 23 to be either the start or end of an age range. You can view the available age ranges on data.census.gov. |
See Also
The ACS 5-Year documentation from the US Census, and an example of this table for 2023.
Attributes
result_format: ResultFormat[np.int64]
-
Information about the format of the ADRIO’s resulting data.
This is an abstract method.
Methods
Name | Description |
---|---|
estimate_data |
Estimate the data usage for this ADRIO in a RUME. |
with_context |
Constructs a clone of this instance which has access to the given context. |
inspect |
Produce an inspection of the ADRIO’s data for the current context. |
evaluate |
Evaluates the ADRIO in the current context. |
age_ranges |
Lists the AgeRanges used by the ACS5 population by age table in definition order for the given year. Note that this does not correspond one-to-one with the values in the B01001 table – this list omits “total” columns and duplicates. |