Skip to content

Commit

Permalink
Merge pull request #3 from zyang91/lab-6
Browse files Browse the repository at this point in the history
Lab 6
  • Loading branch information
zyang91 authored Jun 1, 2024
2 parents ff504bb + bb2a567 commit c775897
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 3 deletions.
200 changes: 197 additions & 3 deletions lab/lab_06.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,205 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"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": [
"['1997',\n",
" '1998',\n",
" '1999',\n",
" '2000',\n",
" '2001',\n",
" '2002',\n",
" '2003',\n",
" '2004',\n",
" '2005a',\n",
" '2005b',\n",
" '2006',\n",
" '2007a',\n",
" '2007b',\n",
" '2008',\n",
" '2009',\n",
" '2010',\n",
" '2011',\n",
" '2012',\n",
" '2013',\n",
" '2014',\n",
" '2015',\n",
" '2016',\n",
" '2017',\n",
" '2018',\n",
" '2019',\n",
" '2020',\n",
" '2021',\n",
" '2022',\n",
" '2023']"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Add your code here."
"Map= geemap.Map(center=[40,-100], zoom=4)\n",
"collection= ee.ImageCollection(\"USDA/NASS/CDL\").select('cropland')\n",
"vis_params= {'bands': ['cropland']}\n",
"years= collection.aggregate_array('system:index').getInfo()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "165a326c",
"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"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c178a7a182bc41be87ad215802ebfc23",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Map(center=[40, -100], controls=(WidgetControl(options=['position', 'transparent_bg'], widget=Dropdown(layout=…"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Map.ts_inspector(\n",
" left_ts=collection, \n",
" right_ts=collection, \n",
" left_names=years, \n",
" right_names=years,\n",
" left_vis=vis_params,\n",
" right_vis=vis_params,\n",
" width='80px',\n",
")\n",
"Map"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "45679fd2",
"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"
}
],
"source": [
"picture= 'usda.png'\n",
"Map.add_image(picture, position='bottomleft')\n",
"\n",
"text= 'Made by Zhanchao Yang'\n",
"Map.add_text(text, position='bottomright')"
]
},
{
Expand Down
Binary file added lab/usda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added results/lab6/Screenshot 2024-05-31 210621.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c775897

Please sign in to comment.