Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bingqing-liu committed Oct 28, 2024
1 parent 12c70a9 commit 31d6b20
Show file tree
Hide file tree
Showing 2 changed files with 336 additions and 82 deletions.
124 changes: 64 additions & 60 deletions book/labs/lab3b.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,42 +76,16 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <style>\n",
" .geemap-dark {\n",
" --jp-widgets-color: white;\n",
" --jp-widgets-label-color: white;\n",
" --jp-ui-font-color1: white;\n",
" --jp-layout-color2: #454545;\n",
" background-color: #383838;\n",
" }\n",
"\n",
" .geemap-dark .jupyter-button {\n",
" --jp-layout-color3: #383838;\n",
" }\n",
"\n",
" .geemap-colab {\n",
" background-color: var(--colab-primary-surface-color, white);\n",
" }\n",
"\n",
" .geemap-colab .jupyter-button {\n",
" --jp-layout-color3: var(--colab-primary-surface-color, white);\n",
" }\n",
" </style>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
"name": "stderr",
"output_type": "stream",
"text": [
"c:\\Users\\C00553090\\AppData\\Local\\miniconda3\\envs\\hypercoast\\lib\\site-packages\\pandas\\core\\computation\\expressions.py:21: UserWarning: Pandas requires version '2.8.4' or newer of 'numexpr' (version '2.7.3' currently installed).\n",
" from pandas.core.computation.check import NUMEXPR_INSTALLED\n"
]
}
],
"source": [
Expand All @@ -122,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -177,7 +151,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -226,7 +200,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -262,30 +236,20 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"From: https://github.com/opengeos/datasets/releases/download/places/Rio_Grande_do_Sul_Brazil.geojson\n",
"To: C:\\Users\\C00553~1\\AppData\\Local\\Temp\\3d72a0d1-2c50-4d9c-897d-7cd490880797.geojson\n",
"100%|██████████| 61.2k/61.2k [00:00<?, ?B/s]\n"
]
}
],
"source": [
"# geemap refers to the geemap library\n",
"# geojson_to_ee(url) is used to convert a GEOJSON file into a Google Earth Engine object. \n",
"# The url variable, the GEOJSON file from the URL is converted into a format (an Earth Engine object) that can be used within the Google Earth Engine framework. \n",
"roi = geemap.geojson_to_ee(url)\n",
"# roi = ee.FeatureCollection(ee.Geometry.BBox(-52.0027, -30.6197, -50.2659, -29.6696))\n",
"#roi = geemap.geojson_to_ee(url)\n",
"roi = ee.FeatureCollection(ee.Geometry.BBox(-91.9264, 28.6081, -88.3441, 30.6893))\n",
"# roi"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -391,12 +355,12 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6473a995af9f4a34bf4780abacb8f02f",
"model_id": "6b4887b5a0ae4555b09391607e8afceb",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Map(center=[-29.77865021719509, -53.24534458841491], controls=(WidgetControl(options=['position', 'transparent"
"Map(center=[29.649126101661345, -90.1352500000001], controls=(WidgetControl(options=['position', 'transparent_"
]
},
"execution_count": 9,
Expand All @@ -420,11 +384,56 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/html": [
"\n",
" <style>\n",
" .geemap-dark {\n",
" --jp-widgets-color: white;\n",
" --jp-widgets-label-color: white;\n",
" --jp-ui-font-color1: white;\n",
" --jp-layout-color2: #454545;\n",
" background-color: #383838;\n",
" }\n",
"\n",
" .geemap-dark .jupyter-button {\n",
" --jp-layout-color3: #383838;\n",
" }\n",
"\n",
" .geemap-colab {\n",
" background-color: var(--colab-primary-surface-color, white);\n",
" }\n",
"\n",
" .geemap-colab .jupyter-button {\n",
" --jp-layout-color3: var(--colab-primary-surface-color, white);\n",
" }\n",
" </style>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"[-91.9264, 28.6081, -88.3441, 30.6893]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#m.user_roi_coords()"
"m.user_roi_coords()"
]
},
{
Expand Down Expand Up @@ -1158,7 +1167,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "hypercoast",
"language": "python",
"name": "python3"
},
Expand All @@ -1173,11 +1182,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
},
"vscode": {
"interpreter": {
"hash": "31f05ea183a4718249d13ada7f166c6bdba1d00716247af5c11c23af8d5923f1"
}
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 31d6b20

Please sign in to comment.