Enrich Using Standard Geography¶
[1]:
from arcgis.features import GeoAccessor
from arcgis.gis import GIS
from arcgis.geoenrichment import Country
Create a GIS Object¶
[3]:
gis = GIS(profile='baqa')
gis
[3]:
Create Country¶
[4]:
usa = Country('usa', gis=gis)
usa
[4]:
<Country - United States (GIS @ https://baqa.mapsqa.arcgis.com version:10.2)>
Discover Available Geographic Levels¶
[5]:
usa.levels
[5]:
level_name | singular_name | plural_name | alias | level_id | admin_level | |
---|---|---|---|---|---|---|
0 | block_groups | Block Group | Block Groups | Block Groups | US.BlockGroups | |
1 | tracts | Census Tract | Census Tracts | Census Tracts | US.Tracts | |
2 | places | Place | Places | Cities and Towns (Places) | US.Places | |
3 | zip5 | ZIP Code | ZIP Codes | ZIP Codes | US.ZIP5 | Admin4 |
4 | csd | County Subdivision | County Subdivisions | County Subdivisions | US.CSD | |
5 | counties | County | Counties | Counties | US.Counties | Admin3 |
6 | cbsa | CBSA | CBSAs | CBSAs | US.CBSA | |
7 | cd | Congressional District | Congressional Districts | Congressional Districts | US.CD | |
8 | dma | DMA | DMAs | DMAs | US.DMA | |
9 | states | State | States | States | US.States | Admin2 |
10 | whole_usa | United States of America | United States of America | Entire Country | US.WholeUSA | Admin1 |
Enrich a County by FIPS¶
[7]:
usa.enrich(['06001'], ['KeyGlobalFacts.TOTPOP'], standard_geography_level='counties')
[7]:
std_geography_level | std_geography_name | std_geography_id | source_country | aggregation_method | population_to_polygon_size_rating | apportionment_confidence | has_data | totpop | SHAPE | |
---|---|---|---|---|---|---|---|---|---|---|
0 | US.Counties | Alameda County | 06001 | USA | Query:US.Counties | 2.191 | 2.576 | 1 | 1707142.0 | {"rings": [[[-122.27036220796694, 37.904395965... |
[ ]: