Example #1
0
def get_geographies(csv_dicts):
    # Returns a list of Geography objects.
    geographies = []
    for csv_dict in csv_dicts:
        population_estimates = [int(csv_dict[key]) for key in ANN_POP_EST_KEYS]
        geo = geography.Geography(csv_dict[GEO_KEY], population_estimates)
        geographies.append(geo)

    return geographies
Example #2
0
 def __init__(self, input_dir, output_file):
     self.key = 'dd53d44d5549b30b1a2537fdc1d0ad5b6a19030c'
     self.api_url = 'http://api.census.gov/data'
     self.population = 'sf1'
     self.economic = 'acs5/profile'
     self.geo = geography.Geography()
     self.geo.load_state_codes(os.path.join(input_dir, "state_codes"))
     self.geo.load_county_codes(os.path.join(input_dir,"county_codes"))
     self.geo.load_zip_codes(os.path.join(input_dir,"zip_codes"))
     self.output_file = output_file
Example #3
0
 def __init__(self):
     #self.player = player.Player()
     self.map_matrix = geography.Geography()
     self.current_room = self.map_matrix.get_current()
     self.command_loop()
Example #4
0
 def init_geo(self):
     ##Geography conversions
     self.geo = geography.Geography()