|
49 | 49 | },
|
50 | 50 | {
|
51 | 51 | "cell_type": "code",
|
52 |
| - "execution_count": 19, |
| 52 | + "execution_count": null, |
53 | 53 | "metadata": {
|
54 |
| - "collapsed": true, |
55 | 54 | "extensions": {
|
56 | 55 | "jupyter_dashboards": {
|
57 | 56 | "version": 1,
|
|
94 | 93 | },
|
95 | 94 | {
|
96 | 95 | "cell_type": "code",
|
97 |
| - "execution_count": 20, |
| 96 | + "execution_count": null, |
98 | 97 | "metadata": {
|
99 | 98 | "code_folding": [
|
100 | 99 | 9
|
|
117 | 116 | }
|
118 | 117 | }
|
119 | 118 | },
|
120 |
| - "outputs": [ |
121 |
| - { |
122 |
| - "data": { |
123 |
| - "application/vnd.jupyter.widget-view+json": { |
124 |
| - "model_id": "25395f4f1dd64b68bcb1f3f38b042cbe" |
125 |
| - } |
126 |
| - }, |
127 |
| - "metadata": {}, |
128 |
| - "output_type": "display_data" |
129 |
| - } |
130 |
| - ], |
| 119 | + "outputs": [], |
131 | 120 | "source": [
|
132 | 121 | "import ipywidgets as widgets\n",
|
133 | 122 | "\n",
|
|
165 | 154 | },
|
166 | 155 | {
|
167 | 156 | "cell_type": "code",
|
168 |
| - "execution_count": 27, |
| 157 | + "execution_count": null, |
169 | 158 | "metadata": {
|
170 | 159 | "extensions": {
|
171 | 160 | "jupyter_dashboards": {
|
|
185 | 174 | }
|
186 | 175 | }
|
187 | 176 | },
|
188 |
| - "outputs": [ |
189 |
| - { |
190 |
| - "data": { |
191 |
| - "application/vnd.jupyter.widget-view+json": { |
192 |
| - "model_id": "5128a449a00147909fa224dc07bffd89" |
193 |
| - } |
194 |
| - }, |
195 |
| - "metadata": {}, |
196 |
| - "output_type": "display_data" |
197 |
| - } |
198 |
| - ], |
| 177 | + "outputs": [], |
199 | 178 | "source": [
|
200 | 179 | "m = gis.map(location.value)\n",
|
201 | 180 | "m.add_layer(landsat)\n",
|
|
212 | 191 | },
|
213 | 192 | {
|
214 | 193 | "cell_type": "code",
|
215 |
| - "execution_count": 22, |
| 194 | + "execution_count": null, |
216 | 195 | "metadata": {
|
217 | 196 | "code_folding": [
|
218 | 197 | 2,
|
|
236 | 215 | }
|
237 | 216 | }
|
238 | 217 | },
|
239 |
| - "outputs": [ |
240 |
| - { |
241 |
| - "data": { |
242 |
| - "application/vnd.jupyter.widget-view+json": { |
243 |
| - "model_id": "b28d51f013434e5886ee09bb7123b320" |
244 |
| - } |
245 |
| - }, |
246 |
| - "metadata": {}, |
247 |
| - "output_type": "display_data" |
248 |
| - } |
249 |
| - ], |
| 218 | + "outputs": [], |
250 | 219 | "source": [
|
251 | 220 | "oldindex = 0 # int(len(df)/2)\n",
|
252 | 221 | "\n",
|
253 | 222 | "# before image date slider\n",
|
254 | 223 | "oldslider = widgets.IntSlider(value=oldindex, min=0,max=10, #len(df) - 1,\n",
|
255 | 224 | " step=1, description='Older:', disabled=False,\n",
|
256 | 225 | " continuous_update=True, orientation='horizontal',\n",
|
257 |
| - " readout=False, readout_format='i', slider_color='white')\n", |
| 226 | + " readout=False, readout_format='f', slider_color='white')\n", |
258 | 227 | "\n",
|
259 | 228 | "old_label = widgets.Label(value='')#str(df.Time.iloc[oldindex].date()))\n",
|
260 | 229 | "\n",
|
|
275 | 244 | },
|
276 | 245 | {
|
277 | 246 | "cell_type": "code",
|
278 |
| - "execution_count": 23, |
| 247 | + "execution_count": null, |
279 | 248 | "metadata": {
|
280 | 249 | "code_folding": [
|
281 | 250 | 2,
|
|
299 | 268 | }
|
300 | 269 | }
|
301 | 270 | },
|
302 |
| - "outputs": [ |
303 |
| - { |
304 |
| - "data": { |
305 |
| - "application/vnd.jupyter.widget-view+json": { |
306 |
| - "model_id": "a932e8894c2049ec9e1960df9ba793e9" |
307 |
| - } |
308 |
| - }, |
309 |
| - "metadata": {}, |
310 |
| - "output_type": "display_data" |
311 |
| - } |
312 |
| - ], |
| 271 | + "outputs": [], |
313 | 272 | "source": [
|
314 | 273 | "newindex = 0 # len(df) - 1\n",
|
315 | 274 | "\n",
|
316 | 275 | "# after image date slider\n",
|
317 | 276 | "newslider = widgets.IntSlider(value=newindex, min=0, max=10, #len(df) - 1,\n",
|
318 | 277 | " step=1, description='Newer:', disabled=False,\n",
|
319 | 278 | " continuous_update=True, orientation='horizontal',\n",
|
320 |
| - " readout=False, readout_format='i', slider_color='white')\n", |
| 279 | + " readout=False, readout_format='f', slider_color='white')\n", |
321 | 280 | "\n",
|
322 | 281 | "new_label = widgets.Label(value='') #str(df.Time.iloc[newindex].date()))\n",
|
323 | 282 | "\n",
|
|
345 | 304 | },
|
346 | 305 | {
|
347 | 306 | "cell_type": "code",
|
348 |
| - "execution_count": 24, |
| 307 | + "execution_count": null, |
349 | 308 | "metadata": {
|
350 | 309 | "code_folding": [
|
351 | 310 | 0
|
352 | 311 | ],
|
353 |
| - "collapsed": true, |
354 | 312 | "extensions": {
|
355 | 313 | "jupyter_dashboards": {
|
356 | 314 | "version": 1,
|
|
396 | 354 | " return_geometry=True,\n",
|
397 | 355 | " return_distinct_values=False,\n",
|
398 | 356 | " order_by_fields=\"AcquisitionDate\")\n",
|
399 |
| - " tdf = fs.df\n", |
| 357 | + " tdf = fs.sdf\n", |
400 | 358 | " df = tdf\n",
|
401 | 359 | " tdf['Time'] = pd.to_datetime(tdf['AcquisitionDate'], unit='ms') \n",
|
402 | 360 | " \n",
|
|
410 | 368 | },
|
411 | 369 | {
|
412 | 370 | "cell_type": "code",
|
413 |
| - "execution_count": 25, |
| 371 | + "execution_count": null, |
414 | 372 | "metadata": {
|
415 |
| - "collapsed": true, |
416 | 373 | "extensions": {
|
417 | 374 | "jupyter_dashboards": {
|
418 | 375 | "version": 1,
|
|
442 | 399 | },
|
443 | 400 | {
|
444 | 401 | "cell_type": "code",
|
445 |
| - "execution_count": 26, |
| 402 | + "execution_count": null, |
446 | 403 | "metadata": {
|
447 | 404 | "code_folding": [
|
448 | 405 | 0
|
|
465 | 422 | }
|
466 | 423 | }
|
467 | 424 | },
|
468 |
| - "outputs": [ |
469 |
| - { |
470 |
| - "data": { |
471 |
| - "application/vnd.jupyter.widget-view+json": { |
472 |
| - "model_id": "9f58ad635da64e2b8c1f678665e3a8af" |
473 |
| - } |
474 |
| - }, |
475 |
| - "metadata": {}, |
476 |
| - "output_type": "display_data" |
477 |
| - } |
478 |
| - ], |
| 425 | + "outputs": [], |
479 | 426 | "source": [
|
480 | 427 | "# create the action button\n",
|
481 | 428 | "diffbtn = widgets.Button(description='Detect changes', disabled=False,\n",
|
|
557 | 504 | "name": "python",
|
558 | 505 | "nbconvert_exporter": "python",
|
559 | 506 | "pygments_lexer": "ipython3",
|
560 |
| - "version": "3.5.3" |
| 507 | + "version": "3.6.5" |
561 | 508 | },
|
562 | 509 | "widgets": {
|
563 | 510 | "state": {
|
|
0 commit comments