F10a Checkpoint
Import libraries¶
In [ ]:
Copied!
import ee
import geemap
import ee
import geemap
Create an interactive map¶
In [ ]:
Copied!
Map = geemap.Map(center=[40, -100], zoom=4)
Map = geemap.Map(center=[40, -100], zoom=4)
Add Earth Engine Python script¶
In [ ]:
Copied!
# Add Earth Engine dataset
image = ee.Image("USGS/SRTMGL1_003")
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Chapter: F1.0 Javascript and the Earth Engine API
# Checkpoint: F10a
# Author: Ujaval Gandhi
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print("Hello World")
city = "San Francisco"
print(city)
population = 873965
print(population)
cities = ["San Francisco", "Los Angeles", "New York", "Atlanta"]
print(cities)
cityData = {
"city": "San Francisco",
"coordinates": [-122.4194, 37.7749],
"population": 873965,
}
print(cityData)
def greet(name):
return "Hello " + name
print(greet("World"))
print(greet("Readers"))
# This is a comment!
# -----------------------------------------------------------------------
# CHECKPOINT
# -----------------------------------------------------------------------
# Add Earth Engine dataset
image = ee.Image("USGS/SRTMGL1_003")
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Chapter: F1.0 Javascript and the Earth Engine API
# Checkpoint: F10a
# Author: Ujaval Gandhi
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print("Hello World")
city = "San Francisco"
print(city)
population = 873965
print(population)
cities = ["San Francisco", "Los Angeles", "New York", "Atlanta"]
print(cities)
cityData = {
"city": "San Francisco",
"coordinates": [-122.4194, 37.7749],
"population": 873965,
}
print(cityData)
def greet(name):
return "Hello " + name
print(greet("World"))
print(greet("Readers"))
# This is a comment!
# -----------------------------------------------------------------------
# CHECKPOINT
# -----------------------------------------------------------------------
Display the interactive map¶
In [ ]:
Copied!
Map
Map