Spaces:
Sleeping
Sleeping
Back to the beginning
Browse files- pages/05_GOES_NBR.py +9 -23
pages/05_GOES_NBR.py
CHANGED
@@ -35,12 +35,10 @@ class Map(geemap.Map):
|
|
35 |
elif selector.value == "August Complex":
|
36 |
self.find_layer('August Complex GOES NBR').visible = True
|
37 |
'''
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
def calc_nbr(pre_start, pre_stop, post_start, post_stop, bbox):
|
44 |
PREgoesCMI = ee.ImageCollection('NOAA/GOES/17/MCMIPF').filter(ee.Filter.date(pre_start, pre_stop)).mean()
|
45 |
POSTgoesCMI = ee.ImageCollection('NOAA/GOES/17/MCMIPF').filter(ee.Filter.date(post_start, post_stop)).mean()
|
46 |
preNBR = PREgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR')
|
@@ -48,8 +46,6 @@ class Map(geemap.Map):
|
|
48 |
dNBR = preNBR.subtract(postNBR).select('NBR')
|
49 |
dNBRclipped = dNBR.clip(bbox)
|
50 |
return dNBRclipped
|
51 |
-
|
52 |
-
def add_ee_data(self):
|
53 |
|
54 |
north_complex_bb = ee.Geometry.BBox(-121.616097, 39.426723, -120.668526, 40.030845)
|
55 |
dixie_bb = ee.Geometry.BBox(-121.680467, 39.759303, -120.065477, 40.873387)
|
@@ -66,16 +62,6 @@ class Map(geemap.Map):
|
|
66 |
self.addLayer(cam_peak, dNBRvisParams, 'Cameron Peak GOES NBR', False)
|
67 |
self.addLayer(aug_complex, dNBRvisParams, 'August Complex GOES NBR', False)
|
68 |
|
69 |
-
'''
|
70 |
-
def calc_nbr(pre_start, pre_stop, post_start, post_stop, bbox):
|
71 |
-
PREgoesCMI = ee.ImageCollection('NOAA/GOES/17/MCMIPF').filter(ee.Filter.date(pre_start, pre_stop)).mean()
|
72 |
-
POSTgoesCMI = ee.ImageCollection('NOAA/GOES/17/MCMIPF').filter(ee.Filter.date(post_start, post_stop)).mean()
|
73 |
-
preNBR = PREgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR')
|
74 |
-
postNBR = POSTgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR')
|
75 |
-
dNBR = preNBR.subtract(postNBR).select('NBR')
|
76 |
-
dNBRclipped = dNBR.clip(bbox)
|
77 |
-
return dNBRclipped
|
78 |
-
'''
|
79 |
|
80 |
@solara.component
|
81 |
def Page():
|
@@ -103,7 +89,10 @@ def Page():
|
|
103 |
center=[39, -120.5],
|
104 |
zoom=8,
|
105 |
height="600px",
|
106 |
-
|
|
|
|
|
|
|
107 |
{
|
108 |
"eeObject": Map.calc_nbr('2020-08-15', '2020-08-16', '2020-09-15', '2020-09-16', north_complex_bb),
|
109 |
"visParams": dNBRvisParams,
|
@@ -127,7 +116,4 @@ def Page():
|
|
127 |
"visParams": dNBRvisParams,
|
128 |
"name": "August Complex GOES NBR",
|
129 |
"visible": False
|
130 |
-
}],
|
131 |
-
basemap="SATELLITE",
|
132 |
-
)
|
133 |
-
|
|
|
35 |
elif selector.value == "August Complex":
|
36 |
self.find_layer('August Complex GOES NBR').visible = True
|
37 |
'''
|
38 |
+
|
39 |
+
def add_ee_data(self):
|
40 |
+
|
41 |
+
def calc_nbr(pre_start, pre_stop, post_start, post_stop, bbox):
|
|
|
|
|
42 |
PREgoesCMI = ee.ImageCollection('NOAA/GOES/17/MCMIPF').filter(ee.Filter.date(pre_start, pre_stop)).mean()
|
43 |
POSTgoesCMI = ee.ImageCollection('NOAA/GOES/17/MCMIPF').filter(ee.Filter.date(post_start, post_stop)).mean()
|
44 |
preNBR = PREgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR')
|
|
|
46 |
dNBR = preNBR.subtract(postNBR).select('NBR')
|
47 |
dNBRclipped = dNBR.clip(bbox)
|
48 |
return dNBRclipped
|
|
|
|
|
49 |
|
50 |
north_complex_bb = ee.Geometry.BBox(-121.616097, 39.426723, -120.668526, 40.030845)
|
51 |
dixie_bb = ee.Geometry.BBox(-121.680467, 39.759303, -120.065477, 40.873387)
|
|
|
62 |
self.addLayer(cam_peak, dNBRvisParams, 'Cameron Peak GOES NBR', False)
|
63 |
self.addLayer(aug_complex, dNBRvisParams, 'August Complex GOES NBR', False)
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
@solara.component
|
67 |
def Page():
|
|
|
89 |
center=[39, -120.5],
|
90 |
zoom=8,
|
91 |
height="600px",
|
92 |
+
basemap="SATELLITE",
|
93 |
+
)
|
94 |
+
|
95 |
+
'''layers=[
|
96 |
{
|
97 |
"eeObject": Map.calc_nbr('2020-08-15', '2020-08-16', '2020-09-15', '2020-09-16', north_complex_bb),
|
98 |
"visParams": dNBRvisParams,
|
|
|
116 |
"visParams": dNBRvisParams,
|
117 |
"name": "August Complex GOES NBR",
|
118 |
"visible": False
|
119 |
+
}],'''
|
|
|
|
|
|