diff --git a/docs/notebooks/gis.ipynb b/docs/notebooks/gis.ipynb index e38d57e6..e5c37ecd 100644 --- a/docs/notebooks/gis.ipynb +++ b/docs/notebooks/gis.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -44,9 +44,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "cf842a08bd53459e97fc4abac8259033", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Map(center=[48.63, -74.71], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_…" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "m = leafmap.Map(center=(48.63, -74.71), \n", " zoom=3,\n", @@ -70,7 +86,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -95,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -108,9 +124,91 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CPU times: user 4.15 s, sys: 574 ms, total: 4.72 s\n", + "Wall time: 4.68 s\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + " | HYBAS_ID | \n", + "Upstream Area (sq. km). | \n", + "geometry | \n", + "category | \n", + "color | \n", + "
---|---|---|---|---|---|
0 | \n", + "7120034330 | \n", + "87595.8 | \n", + "POLYGON ((-74.37864 48.88141, -74.37452 48.886... | \n", + "3 | \n", + "#41b6c4 | \n", + "
1 | \n", + "7120398781 | \n", + "144026.8 | \n", + "POLYGON ((-80.07991 46.77860, -80.08529 46.782... | \n", + "5 | \n", + "#081d58 | \n", + "
2 | \n", + "7120382860 | \n", + "23717.7 | \n", + "POLYGON ((-73.77437 43.36757, -73.77557 43.388... | \n", + "1 | \n", + "#ffffd9 | \n", + "
\n", + " | Station | \n", + "Superficie | \n", + "geometry | \n", + "
---|---|---|---|
0 | \n", + "031101 | \n", + "111.713104 | \n", + "POLYGON ((-73.98519 45.21072, -73.98795 45.209... | \n", + "
1 | \n", + "042102 | \n", + "623.479187 | \n", + "POLYGON ((-78.57120 46.70742, -78.57112 46.707... | \n", + "
2 | \n", + "042103 | \n", + "579.479614 | \n", + "POLYGON ((-78.49014 46.64514, -78.49010 46.645... | \n", + "
\n", + " | Station | \n", + "Superficie | \n", + "area | \n", + "perimeter | \n", + "gravelius | \n", + "centroid | \n", + "
---|---|---|---|---|---|---|
0 | \n", + "031101 | \n", + "111.713104 | \n", + "1.117131e+08 | \n", + "65169.772478 | \n", + "1.739359 | \n", + "(-74.14353174932663, 45.17637767020061) | \n", + "
1 | \n", + "042102 | \n", + "623.479187 | \n", + "6.234792e+08 | \n", + "291795.718170 | \n", + "3.296575 | \n", + "(-78.36569866204955, 46.47218010707938) | \n", + "
2 | \n", + "042103 | \n", + "579.479614 | \n", + "5.794796e+08 | \n", + "283765.058390 | \n", + "3.325331 | \n", + "(-78.37036445281987, 46.48287117609677) | \n", + "
<xarray.Dataset>\n", + "Dimensions: (Station: 3)\n", + "Coordinates:\n", + " * Station (Station) object '031101' '042102' '042103'\n", + "Data variables:\n", + " area (Station) float64 1.117e+08 6.235e+08 5.795e+08\n", + " perimeter (Station) float64 6.517e+04 2.918e+05 2.838e+05\n", + " gravelius (Station) float64 1.739 3.297 3.325\n", + " centroid (Station) object (-74.14353174932663, 45.17637767020061) ... (...
<xarray.Dataset>\n", + "Dimensions: (time: 262968, Station: 3)\n", + "Coordinates:\n", + " * time (time) datetime64[ns] 1981-01-01 ... 2010-12-31T23:00:00\n", + " * Station (Station) object '031101' '042102' '042103'\n", + " source <U20 'era5_land_reanalysis'\n", + "Data variables:\n", + " t2m (Station, time) float64 251.6 251.0 251.3 ... 275.6 275.5 275.5\n", + " tp (Station, time) float64 1.505e-08 6.174e-08 ... 3.698e-06 6.662e-07\n", + " sd (Station, time) float64 0.03733 0.03733 0.03733 ... 0.06421 0.06384\n", + " tas (Station, time) float64 -21.59 -22.17 -21.9 ... 2.455 2.389 2.339
<xarray.Dataset>\n", + "Dimensions: (Station: 3, time: 30)\n", + "Coordinates:\n", + " * Station (Station) object '031101' '042102' '042103'\n", + " source <U20 'era5_land_reanalysis'\n", + " * time (time) datetime64[ns] 1981-01-01 ... 2010-01-01\n", + "Data variables: (12/75)\n", + " tas_max_01 (Station, time) float64 6.34 4.833 ... -4.901 3.161\n", + " tas_max_02 (Station, time) float64 14.46 4.733 ... 4.389 3.544\n", + " tas_max_03 (Station, time) float64 16.96 14.31 ... 8.564 12.78\n", + " tas_max_04 (Station, time) float64 21.76 21.52 ... 24.34 25.98\n", + " tas_max_05 (Station, time) float64 26.1 29.42 ... 24.25 32.24\n", + " tas_max_06 (Station, time) float64 29.13 28.11 ... 30.66 25.42\n", + " ... ...\n", + " sd_mean_10 (Station, time) float64 0.0001856 ... 0.0004031\n", + " sd_mean_11 (Station, time) float64 0.002668 ... 0.007307\n", + " sd_mean_12 (Station, time) float64 0.02428 0.003355 ... 0.05267\n", + " sd_mean_spring (Station, time) float64 0.003797 0.0567 ... 0.03331\n", + " sd_mean_summer_fall (Station, time) float64 0.000253 ... 0.0007276\n", + " sd_mean_year (Station, time) float64 0.008973 0.02961 ... 0.02575\n", + "Attributes:\n", + " cat:variable: ('tas_max_01',)\n", + " cat:xrfreq: AS-JAN\n", + " cat:frequency: yr\n", + " cat:processing_level: indicators\n", + " cat:id:" + ], + "text/plain": [ + "
Station | \n", + "031101 | \n", + "042102 | \n", + "042103 | \n", + "
---|---|---|---|
source | \n", + "era5_land_reanalysis | \n", + "era5_land_reanalysis | \n", + "era5_land_reanalysis | \n", + "
tas_max_01 | \n", + "6.965602 | \n", + "3.642321 | \n", + "3.640586 | \n", + "
tas_max_02 | \n", + "7.062366 | \n", + "4.035679 | \n", + "4.044133 | \n", + "
tas_max_03 | \n", + "14.727131 | \n", + "10.508251 | \n", + "10.525447 | \n", + "
tas_max_04 | \n", + "22.04756 | \n", + "20.00788 | \n", + "19.973493 | \n", + "
tas_max_05 | \n", + "27.27062 | \n", + "25.861504 | \n", + "25.819365 | \n", + "
tas_max_06 | \n", + "30.193029 | \n", + "28.86869 | \n", + "28.824476 | \n", + "
tas_max_07 | \n", + "31.172714 | \n", + "29.498319 | \n", + "29.448428 | \n", + "
tas_max_08 | \n", + "30.302 | \n", + "28.586009 | \n", + "28.537646 | \n", + "
tas_max_09 | \n", + "27.867745 | \n", + "25.764821 | \n", + "25.724547 | \n", + "
tas_max_10 | \n", + "21.995485 | \n", + "19.761131 | \n", + "19.723571 | \n", + "
tas_max_11 | \n", + "16.100378 | \n", + "11.93054 | \n", + "11.896061 | \n", + "
tas_max_12 | \n", + "8.908055 | \n", + "5.355178 | \n", + "5.333868 | \n", + "
tas_max_spring | \n", + "29.834303 | \n", + "28.438763 | \n", + "28.397473 | \n", + "
tas_max_summer_fall | \n", + "31.989697 | \n", + "30.428721 | \n", + "30.377644 | \n", + "
tas_max_year | \n", + "32.055019 | \n", + "30.733275 | \n", + "30.683164 | \n", + "
tas_mean_01 | \n", + "-9.161036 | \n", + "-12.571661 | \n", + "-12.603846 | \n", + "
tas_mean_02 | \n", + "-7.332638 | \n", + "-10.592516 | \n", + "-10.618004 | \n", + "
tas_mean_03 | \n", + "-1.968301 | \n", + "-5.130622 | \n", + "-5.155519 | \n", + "
tas_mean_04 | \n", + "5.768662 | \n", + "3.009224 | \n", + "2.977892 | \n", + "
tas_mean_05 | \n", + "12.918939 | \n", + "10.579376 | \n", + "10.543722 | \n", + "
tas_mean_06 | \n", + "18.478891 | \n", + "15.972164 | \n", + "15.93364 | \n", + "
tas_mean_07 | \n", + "21.10382 | \n", + "18.648619 | \n", + "18.610954 | \n", + "
tas_mean_08 | \n", + "20.100955 | \n", + "17.677313 | \n", + "17.645789 | \n", + "
tas_mean_09 | \n", + "15.861697 | \n", + "13.394408 | \n", + "13.367451 | \n", + "
tas_mean_10 | \n", + "8.888622 | \n", + "6.471057 | \n", + "6.448969 | \n", + "
tas_mean_11 | \n", + "2.655448 | \n", + "-0.054042 | \n", + "-0.077759 | \n", + "
tas_mean_12 | \n", + "-4.687524 | \n", + "-7.745841 | \n", + "-7.776868 | \n", + "
tas_mean_spring | \n", + "5.631036 | \n", + "2.855826 | \n", + "2.825004 | \n", + "
tas_mean_summer_fall | \n", + "15.143924 | \n", + "12.657593 | \n", + "12.628117 | \n", + "
tas_mean_year | \n", + "6.952625 | \n", + "4.207534 | \n", + "4.177412 | \n", + "
tas_min_01 | \n", + "-26.564171 | \n", + "-29.987345 | \n", + "-30.041543 | \n", + "
tas_min_02 | \n", + "-23.371006 | \n", + "-26.130093 | \n", + "-26.180241 | \n", + "
tas_min_03 | \n", + "-18.557775 | \n", + "-22.222626 | \n", + "-22.264767 | \n", + "
tas_min_04 | \n", + "-6.264949 | \n", + "-10.569283 | \n", + "-10.628039 | \n", + "
tas_min_05 | \n", + "1.3559 | \n", + "-1.621507 | \n", + "-1.659695 | \n", + "
tas_min_06 | \n", + "7.422434 | \n", + "4.127083 | \n", + "4.091024 | \n", + "
tas_min_07 | \n", + "11.669775 | \n", + "9.033751 | \n", + "9.005369 | \n", + "
tas_min_08 | \n", + "10.249087 | \n", + "8.665354 | \n", + "8.655322 | \n", + "
tas_min_09 | \n", + "5.174071 | \n", + "3.400956 | \n", + "3.395228 | \n", + "
tas_min_10 | \n", + "-1.209179 | \n", + "-2.293319 | \n", + "-2.296447 | \n", + "
tas_min_11 | \n", + "-7.809751 | \n", + "-9.785807 | \n", + "-9.818372 | \n", + "
tas_min_12 | \n", + "-20.882114 | \n", + "-25.041538 | \n", + "-25.083827 | \n", + "
tas_min_spring | \n", + "-22.266255 | \n", + "-25.01825 | \n", + "-25.060736 | \n", + "
tas_min_summer_fall | \n", + "-5.210938 | \n", + "-7.181023 | \n", + "-7.22109 | \n", + "
tas_min_year | \n", + "-27.326234 | \n", + "-30.971765 | \n", + "-31.024786 | \n", + "
tp_sum_01 | \n", + "0.073449 | \n", + "0.063487 | \n", + "0.063558 | \n", + "
tp_sum_02 | \n", + "0.064617 | \n", + "0.051576 | \n", + "0.051602 | \n", + "
tp_sum_03 | \n", + "0.074649 | \n", + "0.064406 | \n", + "0.064439 | \n", + "
tp_sum_04 | \n", + "0.097331 | \n", + "0.071477 | \n", + "0.071526 | \n", + "
tp_sum_05 | \n", + "0.096184 | \n", + "0.086441 | \n", + "0.086512 | \n", + "
tp_sum_06 | \n", + "0.098178 | \n", + "0.089005 | \n", + "0.089063 | \n", + "
tp_sum_07 | \n", + "0.095603 | \n", + "0.096286 | \n", + "0.096532 | \n", + "
tp_sum_08 | \n", + "0.09489 | \n", + "0.095763 | \n", + "0.096009 | \n", + "
tp_sum_09 | \n", + "0.093631 | \n", + "0.100099 | \n", + "0.100346 | \n", + "
tp_sum_10 | \n", + "0.099199 | \n", + "0.0958 | \n", + "0.09603 | \n", + "
tp_sum_11 | \n", + "0.100186 | \n", + "0.094119 | \n", + "0.094391 | \n", + "
tp_sum_12 | \n", + "0.085857 | \n", + "0.072856 | \n", + "0.072926 | \n", + "
tp_sum_spring | \n", + "0.373323 | \n", + "0.310119 | \n", + "0.31034 | \n", + "
tp_sum_summer_fall | \n", + "0.483459 | \n", + "0.486997 | \n", + "0.488178 | \n", + "
tp_sum_year | \n", + "1.073773 | \n", + "0.981316 | \n", + "0.982936 | \n", + "
sd_mean_01 | \n", + "0.038371 | \n", + "0.078749 | \n", + "0.079101 | \n", + "
sd_mean_02 | \n", + "0.054352 | \n", + "0.112921 | \n", + "0.113426 | \n", + "
sd_mean_03 | \n", + "0.053357 | \n", + "0.129614 | \n", + "0.130332 | \n", + "
sd_mean_04 | \n", + "0.01117 | \n", + "0.058671 | \n", + "0.059455 | \n", + "
sd_mean_05 | \n", + "0.000038 | \n", + "0.000854 | \n", + "0.00089 | \n", + "
sd_mean_06 | \n", + "0.0 | \n", + "0.000003 | \n", + "0.000003 | \n", + "
sd_mean_07 | \n", + "-0.0 | \n", + "-0.0 | \n", + "-0.0 | \n", + "
sd_mean_08 | \n", + "-0.0 | \n", + "-0.0 | \n", + "-0.0 | \n", + "
sd_mean_09 | \n", + "0.0 | \n", + "0.000001 | \n", + "0.000002 | \n", + "
sd_mean_10 | \n", + "0.000188 | \n", + "0.000822 | \n", + "0.000826 | \n", + "
sd_mean_11 | \n", + "0.003037 | \n", + "0.008566 | \n", + "0.008643 | \n", + "
sd_mean_12 | \n", + "0.019363 | \n", + "0.039115 | \n", + "0.039301 | \n", + "
sd_mean_spring | \n", + "0.023324 | \n", + "0.061547 | \n", + "0.061985 | \n", + "
sd_mean_summer_fall | \n", + "0.000244 | \n", + "0.000919 | \n", + "0.000928 | \n", + "
sd_mean_year | \n", + "0.014816 | \n", + "0.035393 | \n", + "0.035613 | \n", + "