In [ ]:
Copied!
import hypercoast
import hypercoast
In [ ]:
Copied!
hypercoast.nasa_earth_login()
hypercoast.nasa_earth_login()
Search for ECOSTRESS data programmatically¶
In [ ]:
Copied!
results, gdf = hypercoast.search_ecostress(
bbox=(-120.522, 34.4266, -120.2665, 34.5653),
temporal=("2023-04-01", "2023-04-02"),
count=-1, # use -1 to return all datasets
return_gdf=True,
)
results, gdf = hypercoast.search_ecostress(
bbox=(-120.522, 34.4266, -120.2665, 34.5653),
temporal=("2023-04-01", "2023-04-02"),
count=-1, # use -1 to return all datasets
return_gdf=True,
)
In [ ]:
Copied!
gdf.explore()
gdf.explore()
Download ECOSTRESS data¶
In [ ]:
Copied!
hypercoast.download_ecostress(results[:5], out_dir="data")
hypercoast.download_ecostress(results[:5], out_dir="data")
Search for ECOSTRESS data interactively¶
In [ ]:
Copied!
m = hypercoast.Map(center=[34.5014, -120.4032], zoom=11)
m.search_ecostress()
m
m = hypercoast.Map(center=[34.5014, -120.4032], zoom=11)
m.search_ecostress()
m
In [ ]:
Copied!
# m._NASA_DATA_GDF.head()
# m._NASA_DATA_GDF.head()
In [ ]:
Copied!
# hypercoast.download_ecostress(m._NASA_DATA_RESULTS[:2], out_dir="data")
# hypercoast.download_ecostress(m._NASA_DATA_RESULTS[:2], out_dir="data")
Visualize ECOSTRESS data¶
Download a sample ECOSTRESS data file and visualize it with HyperCoast.
In [ ]:
Copied!
url = "https://github.com/opengeos/datasets/releases/download/raster/ECOv002_L2T_LSTE_26860_001_10SGD_20230401T203733_0710_01_LST.tif"
url = "https://github.com/opengeos/datasets/releases/download/raster/ECOv002_L2T_LSTE_26860_001_10SGD_20230401T203733_0710_01_LST.tif"
In [ ]:
Copied!
filepath = "data/ECOv002_L2T_LSTE_26860_001_10SGD_20230401T203733_0710_01_LST.tif"
hypercoast.download_file(url, filepath)
filepath = "data/ECOv002_L2T_LSTE_26860_001_10SGD_20230401T203733_0710_01_LST.tif"
hypercoast.download_file(url, filepath)
Visualize the data with HyperCoast.
In [ ]:
Copied!
m = hypercoast.Map()
m.add_basemap("HYBRID")
m.add_raster(filepath, colormap="jet", layer_name="LST")
m.add("spectral")
m
m = hypercoast.Map()
m.add_basemap("HYBRID")
m.add_raster(filepath, colormap="jet", layer_name="LST")
m.add("spectral")
m