You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Julien,
Could you provide an example of how one would select both a particular county and a census tract? For example, run a query to collect data for Richmond County, NY (FIPS 36085) and Census Tract 3 in Richmond County (FIPS (36085000300)? Additionally, how would run a query for all counties in two separate states?
In the example below I tried to select all counties from two states but didn't have any luck.
You can concatenate the separate queries: import pandas as pd import censusdata pd.concat([censusdata.download('acs5', 2015, censusdata.censusgeo([('state', '06')]), ['B01001_001E']), censusdata.download('acs5', 2015, censusdata.censusgeo([('state', '36')]), ['B01001_001E'])])
This would apply to any situation where you were trying to select multiple geographies of different types.
Hi Julien,
Could you provide an example of how one would select both a particular county and a census tract? For example, run a query to collect data for Richmond County, NY (FIPS 36085) and Census Tract 3 in Richmond County (FIPS (36085000300)? Additionally, how would run a query for all counties in two separate states?
In the example below I tried to select all counties from two states but didn't have any luck.
import pandas as pd
import censusdata
pd.set_option('display.expand_frame_repr', False)
pd.set_option('display.precision', 2)
cookbg = censusdata.download('acs5', 2015,
censusdata.censusgeo([('state', '36', '33'), ('county', '*')]),
The text was updated successfully, but these errors were encountered: