Visualizing EMIT data interactively with HyperCoast¶
This notebook demonstrates how to visualize Earth Surface Mineral Dust Source Investigation (EMIT) data interactively with HyperCoast. This notebook is inspired by the EMIT data visualization tutorial - Exploring_EMIT_L2A_Reflectance.ipynb. We have made it much easier to visualize the data interactively with HyperCoast.
In [1]:
Copied!
# %pip install hypercoast
# %pip install hypercoast
In [2]:
Copied!
import hypercoast
import hypercoast
Download a sample EMIT data file from here.
In [3]:
Copied!
url = "https://github.com/opengeos/datasets/releases/download/netcdf/EMIT_L2A_RFL_001_20240404T161230_2409511_009.nc"
url = "https://github.com/opengeos/datasets/releases/download/netcdf/EMIT_L2A_RFL_001_20240404T161230_2409511_009.nc"
In [4]:
Copied!
filepath = "EMIT_L2A_RFL_001_20240404T161230_2409511_009.nc"
hypercoast.download_file(url)
filepath = "EMIT_L2A_RFL_001_20240404T161230_2409511_009.nc"
hypercoast.download_file(url)
Downloading... From: https://github.com/opengeos/datasets/releases/download/netcdf/EMIT_L2A_RFL_001_20240404T161230_2409511_009.nc To: /home/runner/work/HyperCoast/HyperCoast/docs/examples/EMIT_L2A_RFL_001_20240404T161230_2409511_009.nc
0%| | 0.00/1.85G [00:00<?, ?B/s]
1%| | 16.8M/1.85G [00:00<00:11, 166MB/s]
2%|▏ | 46.1M/1.85G [00:00<00:07, 240MB/s]
4%|▍ | 74.4M/1.85G [00:00<00:06, 260MB/s]
6%|▌ | 104M/1.85G [00:00<00:06, 273MB/s]
7%|▋ | 134M/1.85G [00:00<00:06, 281MB/s]
9%|▉ | 164M/1.85G [00:00<00:05, 286MB/s]
10%|█ | 194M/1.85G [00:00<00:05, 289MB/s]
12%|█▏ | 224M/1.85G [00:00<00:05, 290MB/s]
14%|█▎ | 253M/1.85G [00:00<00:05, 289MB/s]
15%|█▌ | 283M/1.85G [00:01<00:05, 289MB/s]
17%|█▋ | 312M/1.85G [00:01<00:05, 290MB/s]
18%|█▊ | 341M/1.85G [00:01<00:05, 289MB/s]
20%|██ | 371M/1.85G [00:01<00:05, 291MB/s]
22%|██▏ | 401M/1.85G [00:01<00:05, 280MB/s]
23%|██▎ | 430M/1.85G [00:01<00:05, 284MB/s]
25%|██▍ | 460M/1.85G [00:01<00:04, 287MB/s]
26%|██▋ | 490M/1.85G [00:01<00:04, 290MB/s]
28%|██▊ | 521M/1.85G [00:01<00:04, 293MB/s]
30%|██▉ | 551M/1.85G [00:01<00:04, 293MB/s]
31%|███▏ | 580M/1.85G [00:02<00:04, 291MB/s]
33%|███▎ | 610M/1.85G [00:02<00:04, 294MB/s]
35%|███▍ | 641M/1.85G [00:02<00:04, 297MB/s]
36%|███▌ | 671M/1.85G [00:02<00:04, 295MB/s]
38%|███▊ | 700M/1.85G [00:02<00:03, 295MB/s]
39%|███▉ | 730M/1.85G [00:02<00:03, 295MB/s]
41%|████ | 760M/1.85G [00:02<00:03, 293MB/s]
43%|████▎ | 790M/1.85G [00:02<00:03, 292MB/s]
44%|████▍ | 819M/1.85G [00:02<00:03, 291MB/s]
46%|████▌ | 848M/1.85G [00:02<00:03, 289MB/s]
47%|████▋ | 878M/1.85G [00:03<00:03, 292MB/s]
49%|████▉ | 908M/1.85G [00:03<00:03, 290MB/s]
51%|█████ | 938M/1.85G [00:03<00:03, 292MB/s]
52%|█████▏ | 968M/1.85G [00:03<00:02, 295MB/s]
54%|█████▍ | 998M/1.85G [00:03<00:02, 293MB/s]
56%|█████▌ | 1.03G/1.85G [00:03<00:02, 295MB/s]
57%|█████▋ | 1.06G/1.85G [00:03<00:02, 295MB/s]
59%|█████▉ | 1.09G/1.85G [00:03<00:02, 296MB/s]
60%|██████ | 1.12G/1.85G [00:03<00:02, 298MB/s]
62%|██████▏ | 1.15G/1.85G [00:03<00:02, 297MB/s]
64%|██████▎ | 1.18G/1.85G [00:04<00:02, 296MB/s]
65%|██████▌ | 1.21G/1.85G [00:04<00:02, 296MB/s]
67%|██████▋ | 1.24G/1.85G [00:04<00:02, 296MB/s]
69%|██████▊ | 1.27G/1.85G [00:04<00:01, 298MB/s]
70%|███████ | 1.30G/1.85G [00:04<00:01, 296MB/s]
72%|███████▏ | 1.33G/1.85G [00:04<00:01, 295MB/s]
73%|███████▎ | 1.36G/1.85G [00:04<00:01, 295MB/s]
75%|███████▌ | 1.39G/1.85G [00:04<00:01, 296MB/s]
77%|███████▋ | 1.42G/1.85G [00:04<00:01, 294MB/s]
78%|███████▊ | 1.45G/1.85G [00:04<00:01, 294MB/s]
80%|███████▉ | 1.48G/1.85G [00:05<00:01, 294MB/s]
81%|████████▏ | 1.51G/1.85G [00:05<00:01, 293MB/s]
83%|████████▎ | 1.54G/1.85G [00:05<00:01, 294MB/s]
85%|████████▍ | 1.57G/1.85G [00:05<00:00, 293MB/s]
86%|████████▋ | 1.60G/1.85G [00:05<00:00, 294MB/s]
88%|████████▊ | 1.63G/1.85G [00:05<00:00, 257MB/s]
89%|████████▉ | 1.66G/1.85G [00:05<00:00, 267MB/s]
91%|█████████ | 1.69G/1.85G [00:05<00:00, 275MB/s]
93%|█████████▎| 1.72G/1.85G [00:05<00:00, 280MB/s]
94%|█████████▍| 1.75G/1.85G [00:06<00:00, 284MB/s]
96%|█████████▌| 1.77G/1.85G [00:06<00:00, 285MB/s]
97%|█████████▋| 1.80G/1.85G [00:06<00:00, 286MB/s]
99%|█████████▉| 1.83G/1.85G [00:06<00:00, 287MB/s]
100%|██████████| 1.85G/1.85G [00:06<00:00, 289MB/s]
Out[4]:
'/home/runner/work/HyperCoast/HyperCoast/docs/examples/EMIT_L2A_RFL_001_20240404T161230_2409511_009.nc'
Load the dataset as a xarray.Dataset
object.
In [5]:
Copied!
dataset = hypercoast.read_emit(filepath)
dataset = hypercoast.read_emit(filepath)
Visualize the data interactively with HyperCoast.
In [6]:
Copied!
m = hypercoast.Map()
m.add_basemap("SATELLITE")
m.add_emit(dataset, wavelengths=[500, 600, 1000], indexes=[3, 2, 1], layer_name="EMIT")
m.add("spectral")
m
m = hypercoast.Map()
m.add_basemap("SATELLITE")
m.add_emit(dataset, wavelengths=[500, 600, 1000], indexes=[3, 2, 1], layer_name="EMIT")
m.add("spectral")
m
Out[6]: