コード例 #1
0
 def __init__(self, base_url):
     self.base_url = base_url
     metadata = fetch_acs_metadata(self.base_url)["variables"]
     metadata = trimMetadata(metadata, MEDIAN_INCOME_BY_RACE_GROUPS.keys())
     self.metadata = parseMetadata(
         metadata,
         [MetadataKey.AGE, MetadataKey.INCOME, MetadataKey.RACE],
         self.metadataInitializer,
     )
     self.state_fips = get_state_fips_mapping(base_url)
     self.county_fips = get_county_fips_mapping(base_url)
     self.data = {}
コード例 #2
0
 def __init__(self, base_url):
     self.base_url = base_url
     metadata = fetch_acs_metadata(self.base_url)["variables"]
     metadata = trimMetadata(metadata, [HEALTH_INSURANCE_BY_SEX_GROUPS_PREFIX])
     self.metadata = parseMetadata(
         metadata, [MetadataKey.AGE, MetadataKey.SEX], lambda key: dict()
     )
     for k, v in self.metadata.items():
         if MetadataKey.POPULATION not in v:
             self.metadata[k][
                 MetadataKey.POPULATION
             ] = HealthInsurancePopulation.TOTAL
     self.state_fips = get_state_fips_mapping(base_url)
     self.county_fips = get_county_fips_mapping(base_url)
     self.data = {}
コード例 #3
0
 def __init__(self, base_url):
     self.base_url = base_url
     metadata = fetch_acs_metadata(self.base_url)["variables"]
     metadata = trimMetadata(
         metadata, HEALTH_INSURANCE_BY_RACE_GROUP_PREFIXES.keys()
     )
     self.metadata = parseMetadata(
         metadata, [MetadataKey.AGE, MetadataKey.RACE], self.metadataInitializer
     )
     for k, v in self.metadata.items():
         if MetadataKey.POPULATION not in v:
             self.metadata[k][
                 MetadataKey.POPULATION
             ] = HealthInsurancePopulation.TOTAL
     self.state_fips = get_state_fips_mapping(base_url)
     self.county_fips = get_county_fips_mapping(base_url)
     self.data = {}