In [40]:
myKey = None
In [36]:
import requests
import pandas as pd
In [41]:
from census import Census
c = Census(myKey)
In [3]:
from us import states
In [ ]:
#2012 Survey of Business Owners: Company Summary
In [42]:
c.acs5.get(('NAME','B01001_012E'),
{'for':'state:37'}
)
Out[42]:
In [30]:
c.acs5.get(('NAME', 'B01001_012E'),
{'for': 'state:32'})
Out[30]:
In [32]:
c.acs5.dataset
Out[32]:
In [38]:
variables = ('NAME', 'B19001_001E')
params = {'for':'tract:*', 'in':'state:37'}
response = c.acs5.get(variables, params)
response = pd.DataFrame(response)
response.dtypes
Out[38]:
In [39]:
response.head()
Out[39]: