Follow the installation directions found here:
https://github.com/catherinekuhn/CloudtoStreet/blob/master/Python%20API%20directions.ipynb
Make sure that you are in the correct environment. To check your current environment, type the following. The environment you are in will have a star next to it.
conda info --envs
If you are not in the ee-python environment, you can switch into it using
source activate ee-python
In [4]:
# Import the Earth Engine Python Package into Python environment.
import ee
import ee.mapclient
# Initialize the Earth Engine object, using the authentication credentials.
ee.Initialize()
In [5]:
image = ee.Image('srtm90_v4')
from IPython.display import Image
Image(url=image.getThumbUrl({'min':0, 'max': 3000}))
Out[5]:
In [2]:
# Print the information for an image asset. the 'srtm90_v4 file is a digital elevation model.
# that is housed in Google's cloud and has an elevation value for every pixel across the whole earth
# at a resolution of 30 meters. That is the map you see below in the static notebook.
print(image.getInfo())
#celebrate the metadata!!
In [3]:
"""Display an image given its ID."""
image = ee.Image('srtm90_v4')
ee.mapclient.addToMap(image, {'min': 0, 'max': 3000})
ee.mapclient.centerMap(-91.1646, 43.8438, 10)