30 census data
Uncomment the following line to install leafmap if needed.
In [ ]:
Copied!
# !pip install leafmap
# !pip install leafmap
In [ ]:
Copied!
import leafmap
import leafmap
Get the Census data WMS tiles as a dictionary. More info can be found at https://tigerweb.geo.census.gov/tigerwebmain/TIGERweb_wms.html
In [ ]:
Copied!
census_data_dict = leafmap.get_census_dict()
census_data_dict = leafmap.get_census_dict()
Print out the list of US Census WMS.
In [ ]:
Copied!
for key in census_data_dict:
print(key)
for key in census_data_dict:
print(key)
Get the list of layers for a WMS.
In [ ]:
Copied!
census_data_dict["Census 2020"]["layers"]
census_data_dict["Census 2020"]["layers"]
Create an interactive map and add Census data layer to it. You might need to zoom in to see the data layer
In [ ]:
Copied!
m = leafmap.Map()
m.add_census_data(wms="Census 2020", layer="States")
m.add_census_data(wms="Census 2020", layer="States_Labels49388")
m
m = leafmap.Map()
m.add_census_data(wms="Census 2020", layer="States")
m.add_census_data(wms="Census 2020", layer="States_Labels49388")
m
Alternatively, you can use the toolbar to load Census data interactively without coding.
