97 join table
Uncomment the following line to install geemap if needed.
In [ ]:
Copied!
# !pip install geemap
# !pip install geemap
In [ ]:
Copied!
import ee
import geemap
import ee
import geemap
Add data to the map.
In [ ]:
Copied!
Map = geemap.Map()
countries = ee.FeatureCollection("users/giswqs/public/countries")
Map.addLayer(countries, {}, "Countries")
Map
Map = geemap.Map()
countries = ee.FeatureCollection("users/giswqs/public/countries")
Map.addLayer(countries, {}, "Countries")
Map
Display the attribute table.
In [ ]:
Copied!
geemap.ee_to_df(countries)
geemap.ee_to_df(countries)
Get data to be joined to the attribute table.
In [ ]:
Copied!
data = "https://raw.githubusercontent.com/gee-community/geemap/master/examples/data/countries.geojson"
data = "https://raw.githubusercontent.com/gee-community/geemap/master/examples/data/countries.geojson"
Join data to the attribute table.
In [ ]:
Copied!
fc = geemap.ee_join_table(countries, data, src_key="id", dst_key="ISO_A3")
fc = geemap.ee_join_table(countries, data, src_key="id", dst_key="ISO_A3")
Display the new attribute table.
In [ ]:
Copied!
geemap.ee_to_df(fc)
geemap.ee_to_df(fc)
Add the new data to the map.
In [ ]:
Copied!
Map.addLayer(fc, {}, "Countries New")
Map.addLayer(fc, {}, "Countries New")