Skip to content

Instantly share code, notes, and snippets.

@scottyhq
Created May 23, 2023 22:59
Show Gist options
  • Save scottyhq/7f78f872989d02b57fa79bfaf040c84e to your computer and use it in GitHub Desktop.
Save scottyhq/7f78f872989d02b57fa79bfaf040c84e to your computer and use it in GitHub Desktop.
uw subsidence
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "0f06b4f0-a0d7-4d70-a14b-5d895d21db39",
"metadata": {},
"outputs": [],
"source": [
"# Search for scenes covering UW parking lot\n",
"import asf_search as asf\n",
"import geopandas as gpd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "127c09d8-7077-4576-888a-845d73d75d11",
"metadata": {},
"outputs": [],
"source": [
"# https://geojson.io/#new&map=15.23/47.654452/-122.303174\n",
"gfa = gpd.GeoDataFrame.from_features( {\n",
" \"type\": \"FeatureCollection\",\n",
" \"features\": [\n",
" {\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\n",
" \"coordinates\": [\n",
" -122.29994319751066,\n",
" 47.657472535245574\n",
" ],\n",
" \"type\": \"Point\"\n",
" }\n",
" }\n",
" ]\n",
"},\n",
" crs=4326 \n",
")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "48323200-619f-4b61-8efb-cf282ea5b75c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Geographic 2D CRS: EPSG:4326>\n",
"Name: WGS 84\n",
"Axis Info [ellipsoidal]:\n",
"- Lat[north]: Geodetic latitude (degree)\n",
"- Lon[east]: Geodetic longitude (degree)\n",
"Area of Use:\n",
"- name: World.\n",
"- bounds: (-180.0, -90.0, 180.0, 90.0)\n",
"Datum: World Geodetic System 1984 ensemble\n",
"- Ellipsoid: WGS 84\n",
"- Prime Meridian: Greenwich"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gfa.crs"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "f45a034a-6b72-4c45-b5d1-c10e73476343",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"&lt;!DOCTYPE html&gt;\n",
"&lt;html&gt;\n",
"&lt;head&gt;\n",
" \n",
" &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;\n",
" \n",
" &lt;script&gt;\n",
" L_NO_TOUCH = false;\n",
" L_DISABLE_3D = false;\n",
" &lt;/script&gt;\n",
" \n",
" &lt;style&gt;html, body {width: 100%;height: 100%;margin: 0;padding: 0;}&lt;/style&gt;\n",
" &lt;style&gt;#map {position:absolute;top:0;bottom:0;right:0;left:0;}&lt;/style&gt;\n",
" &lt;script src=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script src=&quot;https://code.jquery.com/jquery-1.12.4.min.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script src=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js&quot;&gt;&lt;/script&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css&quot;/&gt;\n",
" \n",
" &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,\n",
" initial-scale=1.0, maximum-scale=1.0, user-scalable=no&quot; /&gt;\n",
" &lt;style&gt;\n",
" #map_35fcaf961d8e548ca1e88ec785d2b6cd {\n",
" position: relative;\n",
" width: 100.0%;\n",
" height: 100.0%;\n",
" left: 0.0%;\n",
" top: 0.0%;\n",
" }\n",
" .leaflet-container { font-size: 1rem; }\n",
" &lt;/style&gt;\n",
" \n",
" \n",
" &lt;style&gt;\n",
" .foliumtooltip {\n",
" \n",
" }\n",
" .foliumtooltip table{\n",
" margin: auto;\n",
" }\n",
" .foliumtooltip tr{\n",
" text-align: left;\n",
" }\n",
" .foliumtooltip th{\n",
" padding: 2px; padding-right: 8px;\n",
" }\n",
" &lt;/style&gt;\n",
" \n",
"&lt;/head&gt;\n",
"&lt;body&gt;\n",
" \n",
" \n",
" &lt;div class=&quot;folium-map&quot; id=&quot;map_35fcaf961d8e548ca1e88ec785d2b6cd&quot; &gt;&lt;/div&gt;\n",
" \n",
"&lt;/body&gt;\n",
"&lt;script&gt;\n",
" \n",
" \n",
" var map_35fcaf961d8e548ca1e88ec785d2b6cd = L.map(\n",
" &quot;map_35fcaf961d8e548ca1e88ec785d2b6cd&quot;,\n",
" {\n",
" center: [47.657472535245574, -122.29994319751066],\n",
" crs: L.CRS.EPSG3857,\n",
" zoom: 10,\n",
" zoomControl: true,\n",
" preferCanvas: false,\n",
" }\n",
" );\n",
" L.control.scale().addTo(map_35fcaf961d8e548ca1e88ec785d2b6cd);\n",
"\n",
" \n",
"\n",
" \n",
" \n",
" var tile_layer_7305e4c653b5295ba0b8ae081119b8e7 = L.tileLayer(\n",
" &quot;https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png&quot;,\n",
" {&quot;attribution&quot;: &quot;Data by \\u0026copy; \\u003ca target=\\&quot;_blank\\&quot; href=\\&quot;http://openstreetmap.org\\&quot;\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca target=\\&quot;_blank\\&quot; href=\\&quot;http://www.openstreetmap.org/copyright\\&quot;\\u003eODbL\\u003c/a\\u003e.&quot;, &quot;detectRetina&quot;: false, &quot;maxNativeZoom&quot;: 18, &quot;maxZoom&quot;: 18, &quot;minZoom&quot;: 0, &quot;noWrap&quot;: false, &quot;opacity&quot;: 1, &quot;subdomains&quot;: &quot;abc&quot;, &quot;tms&quot;: false}\n",
" ).addTo(map_35fcaf961d8e548ca1e88ec785d2b6cd);\n",
" \n",
" \n",
" map_35fcaf961d8e548ca1e88ec785d2b6cd.fitBounds(\n",
" [[47.657472535245574, -122.29994319751066], [47.657472535245574, -122.29994319751066]],\n",
" {}\n",
" );\n",
" \n",
" \n",
" function geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_styler(feature) {\n",
" switch(feature.id) {\n",
" default:\n",
" return {&quot;fillOpacity&quot;: 0.5, &quot;weight&quot;: 2};\n",
" }\n",
" }\n",
" function geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_highlighter(feature) {\n",
" switch(feature.id) {\n",
" default:\n",
" return {&quot;fillOpacity&quot;: 0.75};\n",
" }\n",
" }\n",
" function geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_pointToLayer(feature, latlng) {\n",
" var opts = {&quot;bubblingMouseEvents&quot;: true, &quot;color&quot;: &quot;#3388ff&quot;, &quot;dashArray&quot;: null, &quot;dashOffset&quot;: null, &quot;fill&quot;: true, &quot;fillColor&quot;: &quot;#3388ff&quot;, &quot;fillOpacity&quot;: 0.2, &quot;fillRule&quot;: &quot;evenodd&quot;, &quot;lineCap&quot;: &quot;round&quot;, &quot;lineJoin&quot;: &quot;round&quot;, &quot;opacity&quot;: 1.0, &quot;radius&quot;: 2, &quot;stroke&quot;: true, &quot;weight&quot;: 3};\n",
" \n",
" let style = geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_styler(feature)\n",
" Object.assign(opts, style)\n",
" \n",
" return new L.CircleMarker(latlng, opts)\n",
" }\n",
"\n",
" function geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_onEachFeature(feature, layer) {\n",
" layer.on({\n",
" mouseout: function(e) {\n",
" if(typeof e.target.setStyle === &quot;function&quot;){\n",
" geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5.resetStyle(e.target);\n",
" }\n",
" },\n",
" mouseover: function(e) {\n",
" if(typeof e.target.setStyle === &quot;function&quot;){\n",
" const highlightStyle = geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_highlighter(e.target.feature)\n",
" e.target.setStyle(highlightStyle);\n",
" }\n",
" },\n",
" });\n",
" };\n",
" var geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5 = L.geoJson(null, {\n",
" onEachFeature: geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_onEachFeature,\n",
" \n",
" style: geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_styler,\n",
" pointToLayer: geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_pointToLayer\n",
" });\n",
"\n",
" function geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_add (data) {\n",
" geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5\n",
" .addData(data)\n",
" .addTo(map_35fcaf961d8e548ca1e88ec785d2b6cd);\n",
" }\n",
" geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5_add({&quot;bbox&quot;: [-122.29994319751066, 47.657472535245574, -122.29994319751066, 47.657472535245574], &quot;features&quot;: [{&quot;bbox&quot;: [-122.29994319751066, 47.657472535245574, -122.29994319751066, 47.657472535245574], &quot;geometry&quot;: {&quot;coordinates&quot;: [-122.29994319751066, 47.657472535245574], &quot;type&quot;: &quot;Point&quot;}, &quot;id&quot;: &quot;0&quot;, &quot;properties&quot;: {}, &quot;type&quot;: &quot;Feature&quot;}], &quot;type&quot;: &quot;FeatureCollection&quot;});\n",
"\n",
" \n",
" \n",
" geo_json_df7dfdb8fe3c5412a3edcb6bea921fc5.bindTooltip(\n",
" function(layer){\n",
" let div = L.DomUtil.create(&#x27;div&#x27;);\n",
" \n",
" return div\n",
" }\n",
" ,{&quot;className&quot;: &quot;foliumtooltip&quot;, &quot;sticky&quot;: true});\n",
" \n",
"&lt;/script&gt;\n",
"&lt;/html&gt;\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x7ff0fed088d0>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m = gfa.explore()\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "7fe2fb44-1171-4a8c-a8d6-ed50dd7fede6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 513 ms, sys: 13.7 ms, total: 526 ms\n",
"Wall time: 14.5 s\n"
]
}
],
"source": [
"%%time \n",
"results = asf.geo_search(platform=[asf.PLATFORM.SENTINEL1], \n",
" processingLevel=asf.SLC,\n",
" beamMode=asf.BEAMMODE.IW,\n",
" intersectsWith='POINT(-122.29994 47.65747)', \n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "69c9dab1-e889-42a0-a45b-3992ab43a842",
"metadata": {},
"outputs": [],
"source": [
"gf = gpd.GeoDataFrame.from_features(results.geojson(), crs=4326)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "d77a4015-3de6-41c2-b2d9-1f77129efa6e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"792"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(gf)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "686722da-7c73-4acc-8290-58f2adf276e9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"geometry POLYGON ((-119.246002 46.871838, -118.749855 4...\n",
"beamModeType IW\n",
"browse None\n",
"bytes 4756047098\n",
"centerLat 47.9172\n",
"centerLon -120.6783\n",
"faradayRotation None\n",
"fileID S1A_IW_SLC__1SDV_20230523T141333_20230523T1414...\n",
"flightDirection DESCENDING\n",
"groupID S1A_IWDV_0432_0438_048662_115\n",
"granuleType SENTINEL_1A_FRAME\n",
"insarStackId None\n",
"md5sum ea19558a96ede6d9bede656b1c2d2062\n",
"offNadirAngle None\n",
"orbit 48662\n",
"pathNumber 115\n",
"platform Sentinel-1A\n",
"pointingAngle None\n",
"polarization VV+VH\n",
"processingDate 2023-05-23T14:13:33.000Z\n",
"processingLevel SLC\n",
"sceneName S1A_IW_SLC__1SDV_20230523T141333_20230523T1414...\n",
"sensor C-SAR\n",
"startTime 2023-05-23T14:13:33.000Z\n",
"stopTime 2023-05-23T14:14:01.000Z\n",
"url https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_...\n",
"fileName S1A_IW_SLC__1SDV_20230523T141333_20230523T1414...\n",
"frameNumber 432\n",
"Name: 0, dtype: object"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gf.iloc[0]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "dab10ec2-9d3e-408b-b785-158c661309e9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pathNumber\n",
"13 S1A_IW_SLC__1SDV_20230516T142149_20230516T142216_048560_05D741_D0AE-SLC\n",
"64 S1A_IW_SLC__1SDV_20230520T015427_20230520T015454_048611_05D8B8_063A-SLC\n",
"115 S1A_IW_SLC__1SDV_20230523T141333_20230523T141401_048662_05DA4D_8DCD-SLC\n",
"137 S1A_IW_SLC__1SDV_20230513T020235_20230513T020302_048509_05D5C5_BB1A-SLC\n",
"Name: fileID, dtype: object\n"
]
}
],
"source": [
"with gpd.pd.option_context('display.max_colwidth', None):\n",
" print(gf.groupby('pathNumber').fileID.first())"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "33321fb7-c173-473d-8a2b-c6dcbb7a1d3d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"pathNumber\n",
"13 197\n",
"64 199\n",
"115 211\n",
"137 185\n",
"Name: fileID, dtype: int64"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gf.groupby('pathNumber').fileID.count()"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "fa84ab5e-6860-4755-bec8-8be30bd07da7",
"metadata": {},
"outputs": [],
"source": [
"# just 4 for initial viz\n",
"tracks = gf.groupby('pathNumber').first().set_crs(4326)"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "8effb42a-7e89-4f18-be92-c6ac96d53996",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>geometry</th>\n",
" <th>beamModeType</th>\n",
" <th>browse</th>\n",
" <th>bytes</th>\n",
" <th>centerLat</th>\n",
" <th>centerLon</th>\n",
" <th>faradayRotation</th>\n",
" <th>fileID</th>\n",
" <th>flightDirection</th>\n",
" <th>groupID</th>\n",
" <th>...</th>\n",
" <th>polarization</th>\n",
" <th>processingDate</th>\n",
" <th>processingLevel</th>\n",
" <th>sceneName</th>\n",
" <th>sensor</th>\n",
" <th>startTime</th>\n",
" <th>stopTime</th>\n",
" <th>url</th>\n",
" <th>fileName</th>\n",
" <th>frameNumber</th>\n",
" </tr>\n",
" <tr>\n",
" <th>pathNumber</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>POLYGON ((-121.34486 46.76693, -120.86732 48.3...</td>\n",
" <td>IW</td>\n",
" <td>None</td>\n",
" <td>4573649089</td>\n",
" <td>47.7838</td>\n",
" <td>-122.7812</td>\n",
" <td>None</td>\n",
" <td>S1A_IW_SLC__1SDV_20230516T142149_20230516T1422...</td>\n",
" <td>DESCENDING</td>\n",
" <td>S1A_IWDV_0432_0439_048560_013</td>\n",
" <td>...</td>\n",
" <td>VV+VH</td>\n",
" <td>2023-05-16T14:21:49.000Z</td>\n",
" <td>SLC</td>\n",
" <td>S1A_IW_SLC__1SDV_20230516T142149_20230516T1422...</td>\n",
" <td>C-SAR</td>\n",
" <td>2023-05-16T14:21:49.000Z</td>\n",
" <td>2023-05-16T14:22:16.000Z</td>\n",
" <td>https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_...</td>\n",
" <td>S1A_IW_SLC__1SDV_20230516T142149_20230516T1422...</td>\n",
" <td>433</td>\n",
" </tr>\n",
" <tr>\n",
" <th>64</th>\n",
" <td>POLYGON ((-122.73553 48.82788, -122.25249 47.2...</td>\n",
" <td>IW</td>\n",
" <td>None</td>\n",
" <td>4610094998</td>\n",
" <td>48.2316</td>\n",
" <td>-120.8011</td>\n",
" <td>None</td>\n",
" <td>S1A_IW_SLC__1SDV_20230520T015427_20230520T0154...</td>\n",
" <td>ASCENDING</td>\n",
" <td>S1A_IWDV_0153_0160_048611_064</td>\n",
" <td>...</td>\n",
" <td>VV+VH</td>\n",
" <td>2023-05-20T01:54:27.000Z</td>\n",
" <td>SLC</td>\n",
" <td>S1A_IW_SLC__1SDV_20230520T015427_20230520T0154...</td>\n",
" <td>C-SAR</td>\n",
" <td>2023-05-20T01:54:27.000Z</td>\n",
" <td>2023-05-20T01:54:54.000Z</td>\n",
" <td>https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_...</td>\n",
" <td>S1A_IW_SLC__1SDV_20230520T015427_20230520T0154...</td>\n",
" <td>154</td>\n",
" </tr>\n",
" <tr>\n",
" <th>115</th>\n",
" <td>POLYGON ((-119.24600 46.87184, -118.74985 48.5...</td>\n",
" <td>IW</td>\n",
" <td>None</td>\n",
" <td>4756047098</td>\n",
" <td>47.9172</td>\n",
" <td>-120.6783</td>\n",
" <td>None</td>\n",
" <td>S1A_IW_SLC__1SDV_20230523T141333_20230523T1414...</td>\n",
" <td>DESCENDING</td>\n",
" <td>S1A_IWDV_0432_0438_048662_115</td>\n",
" <td>...</td>\n",
" <td>VV+VH</td>\n",
" <td>2023-05-23T14:13:33.000Z</td>\n",
" <td>SLC</td>\n",
" <td>S1A_IW_SLC__1SDV_20230523T141333_20230523T1414...</td>\n",
" <td>C-SAR</td>\n",
" <td>2023-05-23T14:13:33.000Z</td>\n",
" <td>2023-05-23T14:14:01.000Z</td>\n",
" <td>https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_...</td>\n",
" <td>S1A_IW_SLC__1SDV_20230523T141333_20230523T1414...</td>\n",
" <td>432</td>\n",
" </tr>\n",
" <tr>\n",
" <th>137</th>\n",
" <td>POLYGON ((-124.70805 48.54140, -124.22818 46.9...</td>\n",
" <td>IW</td>\n",
" <td>None</td>\n",
" <td>4613670822</td>\n",
" <td>47.9471</td>\n",
" <td>-122.7646</td>\n",
" <td>None</td>\n",
" <td>S1A_IW_SLC__1SDV_20230513T020235_20230513T0203...</td>\n",
" <td>ASCENDING</td>\n",
" <td>S1A_IWDV_0153_0158_048509_137</td>\n",
" <td>...</td>\n",
" <td>VV+VH</td>\n",
" <td>2023-05-13T02:02:35.000Z</td>\n",
" <td>SLC</td>\n",
" <td>S1A_IW_SLC__1SDV_20230513T020235_20230513T0203...</td>\n",
" <td>C-SAR</td>\n",
" <td>2023-05-13T02:02:35.000Z</td>\n",
" <td>2023-05-13T02:03:02.000Z</td>\n",
" <td>https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_...</td>\n",
" <td>S1A_IW_SLC__1SDV_20230513T020235_20230513T0203...</td>\n",
" <td>153</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>4 rows × 27 columns</p>\n",
"</div>"
],
"text/plain": [
" geometry beamModeType \n",
"pathNumber \n",
"13 POLYGON ((-121.34486 46.76693, -120.86732 48.3... IW \\\n",
"64 POLYGON ((-122.73553 48.82788, -122.25249 47.2... IW \n",
"115 POLYGON ((-119.24600 46.87184, -118.74985 48.5... IW \n",
"137 POLYGON ((-124.70805 48.54140, -124.22818 46.9... IW \n",
"\n",
" browse bytes centerLat centerLon faradayRotation \n",
"pathNumber \n",
"13 None 4573649089 47.7838 -122.7812 None \\\n",
"64 None 4610094998 48.2316 -120.8011 None \n",
"115 None 4756047098 47.9172 -120.6783 None \n",
"137 None 4613670822 47.9471 -122.7646 None \n",
"\n",
" fileID flightDirection \n",
"pathNumber \n",
"13 S1A_IW_SLC__1SDV_20230516T142149_20230516T1422... DESCENDING \\\n",
"64 S1A_IW_SLC__1SDV_20230520T015427_20230520T0154... ASCENDING \n",
"115 S1A_IW_SLC__1SDV_20230523T141333_20230523T1414... DESCENDING \n",
"137 S1A_IW_SLC__1SDV_20230513T020235_20230513T0203... ASCENDING \n",
"\n",
" groupID ... polarization \n",
"pathNumber ... \n",
"13 S1A_IWDV_0432_0439_048560_013 ... VV+VH \\\n",
"64 S1A_IWDV_0153_0160_048611_064 ... VV+VH \n",
"115 S1A_IWDV_0432_0438_048662_115 ... VV+VH \n",
"137 S1A_IWDV_0153_0158_048509_137 ... VV+VH \n",
"\n",
" processingDate processingLevel \n",
"pathNumber \n",
"13 2023-05-16T14:21:49.000Z SLC \\\n",
"64 2023-05-20T01:54:27.000Z SLC \n",
"115 2023-05-23T14:13:33.000Z SLC \n",
"137 2023-05-13T02:02:35.000Z SLC \n",
"\n",
" sceneName sensor \n",
"pathNumber \n",
"13 S1A_IW_SLC__1SDV_20230516T142149_20230516T1422... C-SAR \\\n",
"64 S1A_IW_SLC__1SDV_20230520T015427_20230520T0154... C-SAR \n",
"115 S1A_IW_SLC__1SDV_20230523T141333_20230523T1414... C-SAR \n",
"137 S1A_IW_SLC__1SDV_20230513T020235_20230513T0203... C-SAR \n",
"\n",
" startTime stopTime \n",
"pathNumber \n",
"13 2023-05-16T14:21:49.000Z 2023-05-16T14:22:16.000Z \\\n",
"64 2023-05-20T01:54:27.000Z 2023-05-20T01:54:54.000Z \n",
"115 2023-05-23T14:13:33.000Z 2023-05-23T14:14:01.000Z \n",
"137 2023-05-13T02:02:35.000Z 2023-05-13T02:03:02.000Z \n",
"\n",
" url \n",
"pathNumber \n",
"13 https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_... \\\n",
"64 https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_... \n",
"115 https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_... \n",
"137 https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_... \n",
"\n",
" fileName frameNumber \n",
"pathNumber \n",
"13 S1A_IW_SLC__1SDV_20230516T142149_20230516T1422... 433 \n",
"64 S1A_IW_SLC__1SDV_20230520T015427_20230520T0154... 154 \n",
"115 S1A_IW_SLC__1SDV_20230523T141333_20230523T1414... 432 \n",
"137 S1A_IW_SLC__1SDV_20230513T020235_20230513T0203... 153 \n",
"\n",
"[4 rows x 27 columns]"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tracks"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "cafdece7-0bb3-4266-8fc9-763c2307541a",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"&lt;!DOCTYPE html&gt;\n",
"&lt;html&gt;\n",
"&lt;head&gt;\n",
" \n",
" &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;\n",
" \n",
" &lt;script&gt;\n",
" L_NO_TOUCH = false;\n",
" L_DISABLE_3D = false;\n",
" &lt;/script&gt;\n",
" \n",
" &lt;style&gt;html, body {width: 100%;height: 100%;margin: 0;padding: 0;}&lt;/style&gt;\n",
" &lt;style&gt;#map {position:absolute;top:0;bottom:0;right:0;left:0;}&lt;/style&gt;\n",
" &lt;script src=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script src=&quot;https://code.jquery.com/jquery-1.12.4.min.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script src=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js&quot;&gt;&lt;/script&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css&quot;/&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css&quot;/&gt;\n",
" \n",
" &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,\n",
" initial-scale=1.0, maximum-scale=1.0, user-scalable=no&quot; /&gt;\n",
" &lt;style&gt;\n",
" #map_4156525308521705ce3d85133434c4e1 {\n",
" position: relative;\n",
" width: 100.0%;\n",
" height: 100.0%;\n",
" left: 0.0%;\n",
" top: 0.0%;\n",
" }\n",
" .leaflet-container { font-size: 1rem; }\n",
" &lt;/style&gt;\n",
" \n",
" \n",
" &lt;style&gt;\n",
" .foliumtooltip {\n",
" \n",
" }\n",
" .foliumtooltip table{\n",
" margin: auto;\n",
" }\n",
" .foliumtooltip tr{\n",
" text-align: left;\n",
" }\n",
" .foliumtooltip th{\n",
" padding: 2px; padding-right: 8px;\n",
" }\n",
" &lt;/style&gt;\n",
" \n",
" \n",
" &lt;style&gt;\n",
" .foliumtooltip {\n",
" \n",
" }\n",
" .foliumtooltip table{\n",
" margin: auto;\n",
" }\n",
" .foliumtooltip tr{\n",
" text-align: left;\n",
" }\n",
" .foliumtooltip th{\n",
" padding: 2px; padding-right: 8px;\n",
" }\n",
" &lt;/style&gt;\n",
" \n",
" \n",
" &lt;script src=&quot;https://code.jquery.com/ui/1.12.1/jquery-ui.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script&gt;$( function() {\n",
" $( &quot;.maplegend&quot; ).draggable({\n",
" start: function (event, ui) {\n",
" $(this).css({\n",
" right: &quot;auto&quot;,\n",
" top: &quot;auto&quot;,\n",
" bottom: &quot;auto&quot;\n",
" });\n",
" }\n",
" });\n",
" });\n",
" &lt;/script&gt;\n",
" &lt;style type=&#x27;text/css&#x27;&gt;\n",
" .maplegend {\n",
" position: absolute;\n",
" z-index:9999;\n",
" background-color: rgba(255, 255, 255, .8);\n",
" border-radius: 5px;\n",
" box-shadow: 0 0 15px rgba(0,0,0,0.2);\n",
" padding: 10px;\n",
" font: 12px/14px Arial, Helvetica, sans-serif;\n",
" right: 10px;\n",
" bottom: 20px;\n",
" }\n",
" .maplegend .legend-title {\n",
" text-align: left;\n",
" margin-bottom: 5px;\n",
" font-weight: bold;\n",
" }\n",
" .maplegend .legend-scale ul {\n",
" margin: 0;\n",
" margin-bottom: 0px;\n",
" padding: 0;\n",
" float: left;\n",
" list-style: none;\n",
" }\n",
" .maplegend .legend-scale ul li {\n",
" list-style: none;\n",
" margin-left: 0;\n",
" line-height: 16px;\n",
" margin-bottom: 2px;\n",
" }\n",
" .maplegend ul.legend-labels li span {\n",
" display: block;\n",
" float: left;\n",
" height: 14px;\n",
" width: 14px;\n",
" margin-right: 5px;\n",
" margin-left: 0;\n",
" border: 0px solid #ccc;\n",
" }\n",
" .maplegend .legend-source {\n",
" color: #777;\n",
" clear: both;\n",
" }\n",
" .maplegend a {\n",
" color: #777;\n",
" }\n",
" &lt;/style&gt;\n",
" \n",
"&lt;/head&gt;\n",
"&lt;body&gt;\n",
" \n",
" \n",
" &lt;div id=&#x27;maplegend pathNumber&#x27; class=&#x27;maplegend&#x27;&gt;\n",
" &lt;div class=&#x27;legend-title&#x27;&gt;pathNumber&lt;/div&gt;\n",
" &lt;div class=&#x27;legend-scale&#x27;&gt;\n",
" &lt;ul class=&#x27;legend-labels&#x27;&gt;\n",
" &lt;li&gt;&lt;span style=&#x27;background:#1f77b4&#x27;&gt;&lt;/span&gt;13&lt;/li&gt;\n",
" &lt;li&gt;&lt;span style=&#x27;background:#d62728&#x27;&gt;&lt;/span&gt;64&lt;/li&gt;\n",
" &lt;li&gt;&lt;span style=&#x27;background:#f7b6d2&#x27;&gt;&lt;/span&gt;115&lt;/li&gt;\n",
" &lt;li&gt;&lt;span style=&#x27;background:#9edae5&#x27;&gt;&lt;/span&gt;137&lt;/li&gt;\n",
" &lt;/ul&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" \n",
" \n",
" &lt;div class=&quot;folium-map&quot; id=&quot;map_4156525308521705ce3d85133434c4e1&quot; &gt;&lt;/div&gt;\n",
" \n",
"&lt;/body&gt;\n",
"&lt;script&gt;\n",
" \n",
" \n",
" var map_4156525308521705ce3d85133434c4e1 = L.map(\n",
" &quot;map_4156525308521705ce3d85133434c4e1&quot;,\n",
" {\n",
" center: [47.9957775, -121.7289505],\n",
" crs: L.CRS.EPSG3857,\n",
" zoom: 10,\n",
" zoomControl: true,\n",
" preferCanvas: false,\n",
" }\n",
" );\n",
" L.control.scale().addTo(map_4156525308521705ce3d85133434c4e1);\n",
"\n",
" \n",
"\n",
" \n",
" \n",
" var tile_layer_9f5d188906ed92731348ce0ad0b85535 = L.tileLayer(\n",
" &quot;https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png&quot;,\n",
" {&quot;attribution&quot;: &quot;Data by \\u0026copy; \\u003ca target=\\&quot;_blank\\&quot; href=\\&quot;http://openstreetmap.org\\&quot;\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca target=\\&quot;_blank\\&quot; href=\\&quot;http://www.openstreetmap.org/copyright\\&quot;\\u003eODbL\\u003c/a\\u003e.&quot;, &quot;detectRetina&quot;: false, &quot;maxNativeZoom&quot;: 18, &quot;maxZoom&quot;: 18, &quot;minZoom&quot;: 0, &quot;noWrap&quot;: false, &quot;opacity&quot;: 1, &quot;subdomains&quot;: &quot;abc&quot;, &quot;tms&quot;: false}\n",
" ).addTo(map_4156525308521705ce3d85133434c4e1);\n",
" \n",
" \n",
" map_4156525308521705ce3d85133434c4e1.fitBounds(\n",
" [[46.76693, -124.708046], [49.224625, -118.749855]],\n",
" {}\n",
" );\n",
" \n",
" \n",
" function geo_json_c34b1b550f7f985629fc359861e3383c_styler(feature) {\n",
" switch(feature.id) {\n",
" case &quot;0&quot;: \n",
" return {&quot;color&quot;: &quot;#1f77b4&quot;, &quot;fillColor&quot;: &quot;#1f77b4&quot;, &quot;fillOpacity&quot;: 0.5, &quot;weight&quot;: 2};\n",
" case &quot;1&quot;: \n",
" return {&quot;color&quot;: &quot;#d62728&quot;, &quot;fillColor&quot;: &quot;#d62728&quot;, &quot;fillOpacity&quot;: 0.5, &quot;weight&quot;: 2};\n",
" case &quot;3&quot;: \n",
" return {&quot;color&quot;: &quot;#9edae5&quot;, &quot;fillColor&quot;: &quot;#9edae5&quot;, &quot;fillOpacity&quot;: 0.5, &quot;weight&quot;: 2};\n",
" default:\n",
" return {&quot;color&quot;: &quot;#f7b6d2&quot;, &quot;fillColor&quot;: &quot;#f7b6d2&quot;, &quot;fillOpacity&quot;: 0.5, &quot;weight&quot;: 2};\n",
" }\n",
" }\n",
" function geo_json_c34b1b550f7f985629fc359861e3383c_highlighter(feature) {\n",
" switch(feature.id) {\n",
" default:\n",
" return {&quot;fillOpacity&quot;: 0.75};\n",
" }\n",
" }\n",
" function geo_json_c34b1b550f7f985629fc359861e3383c_pointToLayer(feature, latlng) {\n",
" var opts = {&quot;bubblingMouseEvents&quot;: true, &quot;color&quot;: &quot;#3388ff&quot;, &quot;dashArray&quot;: null, &quot;dashOffset&quot;: null, &quot;fill&quot;: true, &quot;fillColor&quot;: &quot;#3388ff&quot;, &quot;fillOpacity&quot;: 0.2, &quot;fillRule&quot;: &quot;evenodd&quot;, &quot;lineCap&quot;: &quot;round&quot;, &quot;lineJoin&quot;: &quot;round&quot;, &quot;opacity&quot;: 1.0, &quot;radius&quot;: 2, &quot;stroke&quot;: true, &quot;weight&quot;: 3};\n",
" \n",
" let style = geo_json_c34b1b550f7f985629fc359861e3383c_styler(feature)\n",
" Object.assign(opts, style)\n",
" \n",
" return new L.CircleMarker(latlng, opts)\n",
" }\n",
"\n",
" function geo_json_c34b1b550f7f985629fc359861e3383c_onEachFeature(feature, layer) {\n",
" layer.on({\n",
" mouseout: function(e) {\n",
" if(typeof e.target.setStyle === &quot;function&quot;){\n",
" geo_json_c34b1b550f7f985629fc359861e3383c.resetStyle(e.target);\n",
" }\n",
" },\n",
" mouseover: function(e) {\n",
" if(typeof e.target.setStyle === &quot;function&quot;){\n",
" const highlightStyle = geo_json_c34b1b550f7f985629fc359861e3383c_highlighter(e.target.feature)\n",
" e.target.setStyle(highlightStyle);\n",
" }\n",
" },\n",
" });\n",
" };\n",
" var geo_json_c34b1b550f7f985629fc359861e3383c = L.geoJson(null, {\n",
" onEachFeature: geo_json_c34b1b550f7f985629fc359861e3383c_onEachFeature,\n",
" \n",
" style: geo_json_c34b1b550f7f985629fc359861e3383c_styler,\n",
" pointToLayer: geo_json_c34b1b550f7f985629fc359861e3383c_pointToLayer\n",
" });\n",
"\n",
" function geo_json_c34b1b550f7f985629fc359861e3383c_add (data) {\n",
" geo_json_c34b1b550f7f985629fc359861e3383c\n",
" .addData(data)\n",
" .addTo(map_4156525308521705ce3d85133434c4e1);\n",
" }\n",
" geo_json_c34b1b550f7f985629fc359861e3383c_add({&quot;bbox&quot;: [-124.708046, 46.76693, -118.749855, 49.224625], &quot;features&quot;: [{&quot;bbox&quot;: [-124.651878, 46.76693, -120.867325, 48.776382], &quot;geometry&quot;: {&quot;coordinates&quot;: [[[-121.344856, 46.76693], [-120.867325, 48.380806], [-124.281364, 48.776382], [-124.651878, 47.161335], [-121.344856, 46.76693]]], &quot;type&quot;: &quot;Polygon&quot;}, &quot;id&quot;: &quot;0&quot;, &quot;properties&quot;: {&quot;__folium_color&quot;: &quot;#1f77b4&quot;, &quot;beamModeType&quot;: &quot;IW&quot;, &quot;browse&quot;: null, &quot;bytes&quot;: 4573649089, &quot;centerLat&quot;: 47.7838, &quot;centerLon&quot;: -122.7812, &quot;faradayRotation&quot;: null, &quot;fileID&quot;: &quot;S1A_IW_SLC__1SDV_20230516T142149_20230516T142216_048560_05D741_D0AE-SLC&quot;, &quot;fileName&quot;: &quot;S1A_IW_SLC__1SDV_20230516T142149_20230516T142216_048560_05D741_D0AE.zip&quot;, &quot;flightDirection&quot;: &quot;DESCENDING&quot;, &quot;frameNumber&quot;: 433, &quot;granuleType&quot;: &quot;SENTINEL_1A_FRAME&quot;, &quot;groupID&quot;: &quot;S1A_IWDV_0432_0439_048560_013&quot;, &quot;insarStackId&quot;: null, &quot;md5sum&quot;: &quot;b46aabe3eae19b9e38d7c53b1a7f772b&quot;, &quot;offNadirAngle&quot;: null, &quot;orbit&quot;: 48560, &quot;pathNumber&quot;: 13, &quot;platform&quot;: &quot;Sentinel-1A&quot;, &quot;pointingAngle&quot;: null, &quot;polarization&quot;: &quot;VV+VH&quot;, &quot;processingDate&quot;: &quot;2023-05-16T14:21:49.000Z&quot;, &quot;processingLevel&quot;: &quot;SLC&quot;, &quot;sceneName&quot;: &quot;S1A_IW_SLC__1SDV_20230516T142149_20230516T142216_048560_05D741_D0AE&quot;, &quot;sensor&quot;: &quot;C-SAR&quot;, &quot;startTime&quot;: &quot;2023-05-16T14:21:49.000Z&quot;, &quot;stopTime&quot;: &quot;2023-05-16T14:22:16.000Z&quot;, &quot;url&quot;: &quot;https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_SLC__1SDV_20230516T142149_20230516T142216_048560_05D741_D0AE.zip&quot;}, &quot;type&quot;: &quot;Feature&quot;}, {&quot;bbox&quot;: [-122.735535, 47.21381, -118.911148, 49.224625], &quot;geometry&quot;: {&quot;coordinates&quot;: [[[-122.735535, 48.827881], [-122.252495, 47.21381], [-118.911148, 47.609215], [-119.284378, 49.224625], [-122.735535, 48.827881]]], &quot;type&quot;: &quot;Polygon&quot;}, &quot;id&quot;: &quot;1&quot;, &quot;properties&quot;: {&quot;__folium_color&quot;: &quot;#d62728&quot;, &quot;beamModeType&quot;: &quot;IW&quot;, &quot;browse&quot;: null, &quot;bytes&quot;: 4610094998, &quot;centerLat&quot;: 48.2316, &quot;centerLon&quot;: -120.8011, &quot;faradayRotation&quot;: null, &quot;fileID&quot;: &quot;S1A_IW_SLC__1SDV_20230520T015427_20230520T015454_048611_05D8B8_063A-SLC&quot;, &quot;fileName&quot;: &quot;S1A_IW_SLC__1SDV_20230520T015427_20230520T015454_048611_05D8B8_063A.zip&quot;, &quot;flightDirection&quot;: &quot;ASCENDING&quot;, &quot;frameNumber&quot;: 154, &quot;granuleType&quot;: &quot;SENTINEL_1A_FRAME&quot;, &quot;groupID&quot;: &quot;S1A_IWDV_0153_0160_048611_064&quot;, &quot;insarStackId&quot;: null, &quot;md5sum&quot;: &quot;b87f124b6d4c1ad2e34b98876a44a453&quot;, &quot;offNadirAngle&quot;: null, &quot;orbit&quot;: 48611, &quot;pathNumber&quot;: 64, &quot;platform&quot;: &quot;Sentinel-1A&quot;, &quot;pointingAngle&quot;: null, &quot;polarization&quot;: &quot;VV+VH&quot;, &quot;processingDate&quot;: &quot;2023-05-20T01:54:27.000Z&quot;, &quot;processingLevel&quot;: &quot;SLC&quot;, &quot;sceneName&quot;: &quot;S1A_IW_SLC__1SDV_20230520T015427_20230520T015454_048611_05D8B8_063A&quot;, &quot;sensor&quot;: &quot;C-SAR&quot;, &quot;startTime&quot;: &quot;2023-05-20T01:54:27.000Z&quot;, &quot;stopTime&quot;: &quot;2023-05-20T01:54:54.000Z&quot;, &quot;url&quot;: &quot;https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_SLC__1SDV_20230520T015427_20230520T015454_048611_05D8B8_063A.zip&quot;}, &quot;type&quot;: &quot;Feature&quot;}, {&quot;bbox&quot;: [-122.560768, 46.871838, -118.749855, 48.938072], &quot;geometry&quot;: {&quot;coordinates&quot;: [[[-119.246002, 46.871838], [-118.749855, 48.541935], [-122.176208, 48.938072], [-122.560768, 47.266689], [-119.246002, 46.871838]]], &quot;type&quot;: &quot;Polygon&quot;}, &quot;id&quot;: &quot;2&quot;, &quot;properties&quot;: {&quot;__folium_color&quot;: &quot;#f7b6d2&quot;, &quot;beamModeType&quot;: &quot;IW&quot;, &quot;browse&quot;: null, &quot;bytes&quot;: 4756047098, &quot;centerLat&quot;: 47.9172, &quot;centerLon&quot;: -120.6783, &quot;faradayRotation&quot;: null, &quot;fileID&quot;: &quot;S1A_IW_SLC__1SDV_20230523T141333_20230523T141401_048662_05DA4D_8DCD-SLC&quot;, &quot;fileName&quot;: &quot;S1A_IW_SLC__1SDV_20230523T141333_20230523T141401_048662_05DA4D_8DCD.zip&quot;, &quot;flightDirection&quot;: &quot;DESCENDING&quot;, &quot;frameNumber&quot;: 432, &quot;granuleType&quot;: &quot;SENTINEL_1A_FRAME&quot;, &quot;groupID&quot;: &quot;S1A_IWDV_0432_0438_048662_115&quot;, &quot;insarStackId&quot;: null, &quot;md5sum&quot;: &quot;ea19558a96ede6d9bede656b1c2d2062&quot;, &quot;offNadirAngle&quot;: null, &quot;orbit&quot;: 48662, &quot;pathNumber&quot;: 115, &quot;platform&quot;: &quot;Sentinel-1A&quot;, &quot;pointingAngle&quot;: null, &quot;polarization&quot;: &quot;VV+VH&quot;, &quot;processingDate&quot;: &quot;2023-05-23T14:13:33.000Z&quot;, &quot;processingLevel&quot;: &quot;SLC&quot;, &quot;sceneName&quot;: &quot;S1A_IW_SLC__1SDV_20230523T141333_20230523T141401_048662_05DA4D_8DCD&quot;, &quot;sensor&quot;: &quot;C-SAR&quot;, &quot;startTime&quot;: &quot;2023-05-23T14:13:33.000Z&quot;, &quot;stopTime&quot;: &quot;2023-05-23T14:14:01.000Z&quot;, &quot;url&quot;: &quot;https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_SLC__1SDV_20230523T141333_20230523T141401_048662_05DA4D_8DCD.zip&quot;}, &quot;type&quot;: &quot;Feature&quot;}, {&quot;bbox&quot;: [-124.708046, 46.92696, -120.865181, 48.942142], &quot;geometry&quot;: {&quot;coordinates&quot;: [[[-124.708046, 48.541397], [-124.22818, 46.92696], [-120.865181, 47.326485], [-121.235565, 48.942142], [-124.708046, 48.541397]]], &quot;type&quot;: &quot;Polygon&quot;}, &quot;id&quot;: &quot;3&quot;, &quot;properties&quot;: {&quot;__folium_color&quot;: &quot;#9edae5&quot;, &quot;beamModeType&quot;: &quot;IW&quot;, &quot;browse&quot;: null, &quot;bytes&quot;: 4613670822, &quot;centerLat&quot;: 47.9471, &quot;centerLon&quot;: -122.7646, &quot;faradayRotation&quot;: null, &quot;fileID&quot;: &quot;S1A_IW_SLC__1SDV_20230513T020235_20230513T020302_048509_05D5C5_BB1A-SLC&quot;, &quot;fileName&quot;: &quot;S1A_IW_SLC__1SDV_20230513T020235_20230513T020302_048509_05D5C5_BB1A.zip&quot;, &quot;flightDirection&quot;: &quot;ASCENDING&quot;, &quot;frameNumber&quot;: 153, &quot;granuleType&quot;: &quot;SENTINEL_1A_FRAME&quot;, &quot;groupID&quot;: &quot;S1A_IWDV_0153_0158_048509_137&quot;, &quot;insarStackId&quot;: null, &quot;md5sum&quot;: &quot;ca6ae7c3ce80e0266b25a1eedf2e82ba&quot;, &quot;offNadirAngle&quot;: null, &quot;orbit&quot;: 48509, &quot;pathNumber&quot;: 137, &quot;platform&quot;: &quot;Sentinel-1A&quot;, &quot;pointingAngle&quot;: null, &quot;polarization&quot;: &quot;VV+VH&quot;, &quot;processingDate&quot;: &quot;2023-05-13T02:02:35.000Z&quot;, &quot;processingLevel&quot;: &quot;SLC&quot;, &quot;sceneName&quot;: &quot;S1A_IW_SLC__1SDV_20230513T020235_20230513T020302_048509_05D5C5_BB1A&quot;, &quot;sensor&quot;: &quot;C-SAR&quot;, &quot;startTime&quot;: &quot;2023-05-13T02:02:35.000Z&quot;, &quot;stopTime&quot;: &quot;2023-05-13T02:03:02.000Z&quot;, &quot;url&quot;: &quot;https://datapool.asf.alaska.edu/SLC/SA/S1A_IW_SLC__1SDV_20230513T020235_20230513T020302_048509_05D5C5_BB1A.zip&quot;}, &quot;type&quot;: &quot;Feature&quot;}], &quot;type&quot;: &quot;FeatureCollection&quot;});\n",
"\n",
" \n",
" \n",
" geo_json_c34b1b550f7f985629fc359861e3383c.bindTooltip(\n",
" function(layer){\n",
" let div = L.DomUtil.create(&#x27;div&#x27;);\n",
" \n",
" let handleObject = feature=&gt;typeof(feature)==&#x27;object&#x27; ? JSON.stringify(feature) : feature;\n",
" let fields = [&quot;pathNumber&quot;, &quot;beamModeType&quot;, &quot;browse&quot;, &quot;bytes&quot;, &quot;centerLat&quot;, &quot;centerLon&quot;, &quot;faradayRotation&quot;, &quot;fileID&quot;, &quot;flightDirection&quot;, &quot;groupID&quot;, &quot;granuleType&quot;, &quot;insarStackId&quot;, &quot;md5sum&quot;, &quot;offNadirAngle&quot;, &quot;orbit&quot;, &quot;platform&quot;, &quot;pointingAngle&quot;, &quot;polarization&quot;, &quot;processingDate&quot;, &quot;processingLevel&quot;, &quot;sceneName&quot;, &quot;sensor&quot;, &quot;startTime&quot;, &quot;stopTime&quot;, &quot;url&quot;, &quot;fileName&quot;, &quot;frameNumber&quot;];\n",
" let aliases = [&quot;pathNumber&quot;, &quot;beamModeType&quot;, &quot;browse&quot;, &quot;bytes&quot;, &quot;centerLat&quot;, &quot;centerLon&quot;, &quot;faradayRotation&quot;, &quot;fileID&quot;, &quot;flightDirection&quot;, &quot;groupID&quot;, &quot;granuleType&quot;, &quot;insarStackId&quot;, &quot;md5sum&quot;, &quot;offNadirAngle&quot;, &quot;orbit&quot;, &quot;platform&quot;, &quot;pointingAngle&quot;, &quot;polarization&quot;, &quot;processingDate&quot;, &quot;processingLevel&quot;, &quot;sceneName&quot;, &quot;sensor&quot;, &quot;startTime&quot;, &quot;stopTime&quot;, &quot;url&quot;, &quot;fileName&quot;, &quot;frameNumber&quot;];\n",
" let table = &#x27;&lt;table&gt;&#x27; +\n",
" String(\n",
" fields.map(\n",
" (v,i)=&gt;\n",
" `&lt;tr&gt;\n",
" &lt;th&gt;${aliases[i]}&lt;/th&gt;\n",
" \n",
" &lt;td&gt;${handleObject(layer.feature.properties[v])}&lt;/td&gt;\n",
" &lt;/tr&gt;`).join(&#x27;&#x27;))\n",
" +&#x27;&lt;/table&gt;&#x27;;\n",
" div.innerHTML=table;\n",
" \n",
" return div\n",
" }\n",
" ,{&quot;className&quot;: &quot;foliumtooltip&quot;, &quot;sticky&quot;: true});\n",
" \n",
" \n",
" function geo_json_bcf164d2630f0585aa197d8261e756fd_styler(feature) {\n",
" switch(feature.id) {\n",
" default:\n",
" return {&quot;color&quot;: &quot;k&quot;, &quot;fillColor&quot;: &quot;k&quot;, &quot;fillOpacity&quot;: 0.5, &quot;weight&quot;: 2};\n",
" }\n",
" }\n",
" function geo_json_bcf164d2630f0585aa197d8261e756fd_highlighter(feature) {\n",
" switch(feature.id) {\n",
" default:\n",
" return {&quot;fillOpacity&quot;: 0.75};\n",
" }\n",
" }\n",
" function geo_json_bcf164d2630f0585aa197d8261e756fd_pointToLayer(feature, latlng) {\n",
" var opts = {&quot;bubblingMouseEvents&quot;: true, &quot;color&quot;: &quot;#3388ff&quot;, &quot;dashArray&quot;: null, &quot;dashOffset&quot;: null, &quot;fill&quot;: true, &quot;fillColor&quot;: &quot;#3388ff&quot;, &quot;fillOpacity&quot;: 0.2, &quot;fillRule&quot;: &quot;evenodd&quot;, &quot;lineCap&quot;: &quot;round&quot;, &quot;lineJoin&quot;: &quot;round&quot;, &quot;opacity&quot;: 1.0, &quot;radius&quot;: 2, &quot;stroke&quot;: true, &quot;weight&quot;: 3};\n",
" \n",
" let style = geo_json_bcf164d2630f0585aa197d8261e756fd_styler(feature)\n",
" Object.assign(opts, style)\n",
" \n",
" return new L.CircleMarker(latlng, opts)\n",
" }\n",
"\n",
" function geo_json_bcf164d2630f0585aa197d8261e756fd_onEachFeature(feature, layer) {\n",
" layer.on({\n",
" mouseout: function(e) {\n",
" if(typeof e.target.setStyle === &quot;function&quot;){\n",
" geo_json_bcf164d2630f0585aa197d8261e756fd.resetStyle(e.target);\n",
" }\n",
" },\n",
" mouseover: function(e) {\n",
" if(typeof e.target.setStyle === &quot;function&quot;){\n",
" const highlightStyle = geo_json_bcf164d2630f0585aa197d8261e756fd_highlighter(e.target.feature)\n",
" e.target.setStyle(highlightStyle);\n",
" }\n",
" },\n",
" });\n",
" };\n",
" var geo_json_bcf164d2630f0585aa197d8261e756fd = L.geoJson(null, {\n",
" onEachFeature: geo_json_bcf164d2630f0585aa197d8261e756fd_onEachFeature,\n",
" \n",
" style: geo_json_bcf164d2630f0585aa197d8261e756fd_styler,\n",
" pointToLayer: geo_json_bcf164d2630f0585aa197d8261e756fd_pointToLayer\n",
" });\n",
"\n",
" function geo_json_bcf164d2630f0585aa197d8261e756fd_add (data) {\n",
" geo_json_bcf164d2630f0585aa197d8261e756fd\n",
" .addData(data)\n",
" .addTo(map_4156525308521705ce3d85133434c4e1);\n",
" }\n",
" geo_json_bcf164d2630f0585aa197d8261e756fd_add({&quot;bbox&quot;: [-122.29994319751066, 47.657472535245574, -122.29994319751066, 47.657472535245574], &quot;features&quot;: [{&quot;bbox&quot;: [-122.29994319751066, 47.657472535245574, -122.29994319751066, 47.657472535245574], &quot;geometry&quot;: {&quot;coordinates&quot;: [-122.29994319751066, 47.657472535245574], &quot;type&quot;: &quot;Point&quot;}, &quot;id&quot;: &quot;0&quot;, &quot;properties&quot;: {&quot;__folium_color&quot;: &quot;k&quot;}, &quot;type&quot;: &quot;Feature&quot;}], &quot;type&quot;: &quot;FeatureCollection&quot;});\n",
"\n",
" \n",
" \n",
" geo_json_bcf164d2630f0585aa197d8261e756fd.bindTooltip(\n",
" function(layer){\n",
" let div = L.DomUtil.create(&#x27;div&#x27;);\n",
" \n",
" return div\n",
" }\n",
" ,{&quot;className&quot;: &quot;foliumtooltip&quot;, &quot;sticky&quot;: true});\n",
" \n",
"&lt;/script&gt;\n",
"&lt;/html&gt;\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x7ff0fa009b10>"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m = tracks.reset_index().explore(column='pathNumber', categorical=True)\n",
"gfa.explore(m=m, color='k') # add point\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": 34,
"id": "d8a0405e-6d77-4411-9b96-1cfcab4f1e74",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"pathNumber\n",
"13 2023-05-16T14:21:49.000Z\n",
"64 2023-05-20T01:54:27.000Z\n",
"115 2023-05-23T14:13:33.000Z\n",
"137 2023-05-13T02:02:35.000Z\n",
"Name: startTime, dtype: object"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tracks.startTime"
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "bc214aa3-6af2-4593-9168-99c6e6d10281",
"metadata": {},
"outputs": [],
"source": [
"times = gpd.pd.to_datetime(tracks.startTime)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "e3b8cb55-1618-43ea-81b7-1c50f9130232",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"pathNumber\n",
"13 2023-05-16 07:21:49-07:00\n",
"64 2023-05-19 18:54:27-07:00\n",
"115 2023-05-23 07:13:33-07:00\n",
"137 2023-05-12 19:02:35-07:00\n",
"Name: startTime, dtype: datetime64[ns, US/Pacific]"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"times.dt.tz_convert('US/Pacific')"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "f76ea00a-be8f-43ad-a8b4-05e0fc594e57",
"metadata": {},
"outputs": [],
"source": [
"gfb = gpd.GeoDataFrame.from_features({\n",
" \"type\": \"FeatureCollection\",\n",
" \"features\": [\n",
" {\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\n",
" \"coordinates\": [\n",
" [\n",
" [\n",
" -122.32757453170552,\n",
" 47.67669197876623\n",
" ],\n",
" [\n",
" -122.32757453170552,\n",
" 47.64630660556256\n",
" ],\n",
" [\n",
" -122.25529245723203,\n",
" 47.64630660556256\n",
" ],\n",
" [\n",
" -122.25529245723203,\n",
" 47.67669197876623\n",
" ],\n",
" [\n",
" -122.32757453170552,\n",
" 47.67669197876623\n",
" ]\n",
" ]\n",
" ],\n",
" \"type\": \"Polygon\"\n",
" }\n",
" }\n",
" ]\n",
"},\n",
" crs=4326,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "468f6c0f-a856-490f-81f7-4ea920545da8",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>minx</th>\n",
" <th>miny</th>\n",
" <th>maxx</th>\n",
" <th>maxy</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>-122.327575</td>\n",
" <td>47.646307</td>\n",
" <td>-122.255292</td>\n",
" <td>47.676692</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" minx miny maxx maxy\n",
"0 -122.327575 47.646307 -122.255292 47.676692"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gfb.bounds"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "80e2c284-5686-4a1f-9607-33372bb45cd7",
"metadata": {},
"outputs": [],
"source": [
"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:.local-hyp3]",
"language": "python",
"name": "conda-env-.local-hyp3-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment