How to use the censusdata.geographies function in CensusData

To help you get started, we’ve selected a few CensusData examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jtleider / censusdata / test / test_download.py View on Github external
def test_geographies_county(self):
		self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs5', 2015), 
			{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
			'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
			'Kalawao County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '005')]),
			'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
			'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})
		self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs1', 2015), 
			{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
			'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
			'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
			'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})
github jtleider / censusdata / test / test_download.py View on Github external
def test_geographies_state(self):
		for year in range(2009, 2018+1):
			self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '*')]), 'acs5', year),
				{
				'Alaska': censusdata.censusgeo([('state', '02')]),
				'Alabama': censusdata.censusgeo([('state', '01')]),
				'Arkansas': censusdata.censusgeo([('state', '05')]),
				'Arizona': censusdata.censusgeo([('state', '04')]),
				'California': censusdata.censusgeo([('state', '06')]),
				'Colorado': censusdata.censusgeo([('state', '08')]),
				'Connecticut': censusdata.censusgeo([('state', '09')]),
				'District of Columbia': censusdata.censusgeo([('state', '11')]),
				'Delaware': censusdata.censusgeo([('state', '10')]),
				'Florida': censusdata.censusgeo([('state', '12')]),
				'Georgia': censusdata.censusgeo([('state', '13')]),
				'Hawaii': censusdata.censusgeo([('state', '15')]),
				'Iowa': censusdata.censusgeo([('state', '19')]),
				'Idaho': censusdata.censusgeo([('state', '16')]),
				'Illinois': censusdata.censusgeo([('state', '17')]),
github jtleider / censusdata / test / test_download.py View on Github external
def test_geographies_county(self):
		self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs5', 2015), 
			{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
			'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
			'Kalawao County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '005')]),
			'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
			'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})
		self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs1', 2015), 
			{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
			'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
			'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
			'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})

CensusData

Download data from U.S. Census API

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis

Similar packages