Path: blob/master/tutorials/FeatureCollection/us_census_data.ipynb
2313 views
U.S. Census Data
The United States Census Bureau Topologically Integrated Geographic Encoding and Referencing (TIGER) dataset contains the 2018 boundaries for the primary governmental divisions of the United States. In addition to the fifty states, the Census Bureau treats the District of Columbia, Puerto Rico, and each of the island areas (American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands) as the statistical equivalents of States for the purpose of data presentation. Each feature represents a state or state equivalent.
For full technical details on all TIGER 2018 products, see the TIGER technical documentation.
TIGER: US Census States:
ee.FeatureCollection("TIGER/2018/States")TIGER: US Census Counties:
ee.FeatureCollection("TIGER/2018/Counties")TIGER: US Census Tracts:
ee.FeatureCollection("TIGER/2010/Tracts_DP1")TIGER: US Census Blocks:
ee.FeatureCollection("TIGER/2010/Blocks")TIGER: US Census Roads:
ee.FeatureCollection("TIGER/2016/Roads")TIGER: US Census 5-digit ZIP Code:
ee.FeatureCollection("TIGER/2010/ZCTA5")
Install Earth Engine API and geemap
Install the Earth Engine Python API and geemap. The geemap Python package is built upon the ipyleaflet and folium packages and implements several methods for interacting with Earth Engine data layers, such as Map.addLayer(), Map.setCenter(), and Map.centerObject(). The following script checks if the geemap package has been installed. If not, it will install geemap, which automatically installs its dependencies, including earthengine-api, folium, and ipyleaflet.
Important note: A key difference between folium and ipyleaflet is that ipyleaflet is built upon ipywidgets and allows bidirectional communication between the front-end and the backend enabling the use of the map to capture user input, while folium is meant for displaying static data only (source). Note that Google Colab currently does not support ipyleaflet (source). Therefore, if you are using geemap with Google Colab, you should use import geemap.foliumap. If you are using geemap with binder or a local Jupyter notebook server, you can use import geemap, which provides more functionalities for capturing user input (e.g., mouse-clicking and moving).
TIGER: US Census States
https://developers.google.com/earth-engine/datasets/catalog/TIGER_2018_States

Displaying data
Displaying vector as raster
Select by attribute
Select one single state
Select multiple states
Printing all values of a column
Descriptive statistics of a column
For example, we can calculate the total land area of all states:
Add a new column to the attribute table
Set symbology based on column values
Download attribute table as a CSV
Formatting the output
Download data as shapefile to Google Drive
TIGER: US Census Blocks
https://developers.google.com/earth-engine/datasets/catalog/TIGER_2010_Blocks

TIGER: US Census Counties 2018
https://developers.google.com/earth-engine/datasets/catalog/TIGER_2018_Counties

View source on GitHub
Run in Google Colab
