Skip to content

Commit

Permalink
Update the notebooks for new widget
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaeaubry committed Jun 26, 2024
1 parent 230581b commit 3a20b5c
Show file tree
Hide file tree
Showing 75 changed files with 36,333 additions and 226 deletions.
7 changes: 5 additions & 2 deletions guide/01-getting-started/install-and-set-up.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,10 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"source": [
"## Install as a Docker image\n",
Expand Down Expand Up @@ -578,7 +581,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand Down
9 changes: 6 additions & 3 deletions guide/01-getting-started/install-older-versions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"source": [
"---------------------------------------\n",
Expand Down Expand Up @@ -446,7 +449,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.11"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand Down Expand Up @@ -492,5 +495,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
4 changes: 2 additions & 2 deletions guide/01-getting-started/system-requirements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand Down Expand Up @@ -141,5 +141,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
6 changes: 3 additions & 3 deletions guide/01-getting-started/understanding-conda.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -216,7 +216,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand Down Expand Up @@ -262,5 +262,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
372 changes: 371 additions & 1 deletion guide/01-getting-started/using-the-api.ipynb

Large diffs are not rendered by default.

143 changes: 142 additions & 1 deletion guide/01-getting-started/using-the-jupyter-notebook-environment.ipynb
Original file line number Diff line number Diff line change
@@ -1 +1,142 @@
{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["# Using the Jupyter Notebook environment\n", "\n", "This section provides a quick introduction to the Jupyter Notebook environment where you can run Python code in an interactive manner and visualize the output as maps and charts. Refer to the [official Jupyter documentation](http://jupyter.readthedocs.io/en/latest/) and [this quick start guide](https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/index.html) for further details."]}, {"cell_type": "markdown", "metadata": {"toc": true}, "source": ["<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n", "<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#Using-the-Jupyter-Notebook-environment\" data-toc-modified-id=\"Using-the-Jupyter-Notebook-environment-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>Using the Jupyter Notebook environment</a></span><ul class=\"toc-item\"><li><span><a href=\"#Starting-the-Jupyter-Notebook-environment\" data-toc-modified-id=\"Starting-the-Jupyter-Notebook-environment-1.1\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>Starting the Jupyter Notebook environment</a></span></li><li><span><a href=\"#Running-the-sample-notebooks\" data-toc-modified-id=\"Running-the-sample-notebooks-1.2\"><span class=\"toc-item-num\">1.2&nbsp;&nbsp;</span>Running the sample notebooks</a></span></li><li><span><a href=\"#Creating-new-notebooks\" data-toc-modified-id=\"Creating-new-notebooks-1.3\"><span class=\"toc-item-num\">1.3&nbsp;&nbsp;</span>Creating new notebooks</a></span></li><li><span><a href=\"#Further-help-and-keyboard-shortcuts\" data-toc-modified-id=\"Further-help-and-keyboard-shortcuts-1.4\"><span class=\"toc-item-num\">1.4&nbsp;&nbsp;</span>Further help and keyboard shortcuts</a></span></li></ul></li></ul></div>"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Starting the Jupyter Notebook environment\n", "\n", "Once conda and the ArcGIS API for Python is [installed](https://developers.arcgis.com/python/guide/install-and-set-up), you can start the Jupyter Notebook environment by typing the following command in your terminal.\n", "\n", " jupyter notebook\n", "\n", "If you are running a Windows OS, this could be your command prompt or PowerShell window. Similarly if you are running a Mac or Linux OS, this could be your terminal. Below is a screen shot of how it would appear if you were running the command from Windows command prompt."]}, {"cell_type": "markdown", "metadata": {}, "source": ["![Windows command prompt running jupyter notebook](../../static/img/guide_getstarted_usingjupyternotebooks_01.png)"]}, {"cell_type": "markdown", "metadata": {}, "source": ["If you installed the ArcGIS API for Python in a conda **environment** other than root (which is the default), you need to `activate` that environment before starting the Jupyter Notebook. For more information on the benefits of using environments and how to create and manage them, refer to this [official documentation page](http://conda.pydata.org/docs/using/envs.html).\n", "\n", "If you are running a sample notebook for the API, you need to 'cd' into the directory where you [downloaded the samples](https://github.com/Esri/arcgis-python-api/releases/tag/v0.3-beta). In the example above, the samples have been downloaded and extracted into c:\\code directory.\n", "\n", "The command starts Jupyter Notebook and opens it in your default web browser as shown below."]}, {"cell_type": "markdown", "metadata": {}, "source": ["![Jupyter Notebook web application](../../static/img/guide_getstarted_usingjupyternotebooks_02.png)\n", "\n", "The page you see in this image is called the Notebook Dashboard."]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Running the sample notebooks\n", "\n", "In the Jupyter Notebook, you can navigate the folder structure and click on a sample notebook. This opens the notebook in a new tab or window. You can run each cell by selecting it and clicking on the 'run cell' button. Alternately, you can run a cell using the keyboard shortcut `shift + enter`. The animation below shows these steps in action."]}, {"cell_type": "markdown", "metadata": {}, "source": ["![running a sample notebook](../../static/img/guide_getstarted_usingjupyternotebooks_03.gif)\n", "\n", "When a cell is executing the cell number turns to an asterisk `(*)` and the circle next to the kernal name (Python 3 in the gif above) turns solid."]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Creating new notebooks\n", "\n", "In addition to running the sample notebooks, you can create new notebooks for your projects. To do so, from the Notebook Dashboard page, click on the 'New' button and select a Python kernel of choice as shown in the image below.\n", "\n", "![creating new notebooks](../../static/img/guide_getstarted_usingjupyternotebooks_04.png)\n", "\n", "Alternately, you can create new notebooks from the 'File' menu of a running notebook. In the screenshot above, note the icons of currently running notebooks are green in color."]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Further help and keyboard shortcuts\n", "\n", "You can get a tour of the notebook interface from the `Help -> User Interface Tour` menu. As you get used to this new interface, you can enhance your productivity by learning a few keyboard shortcuts. Accessing `Help > Keyboard shortcuts` from a running notebook will bring up a help dialog as shown below.\n", "\n", "![keyboard shortcuts](../../static/img/guide_getstarted_usingjupyternotebooks_05.png)\n", "\n", "Among the shortcuts, `ctrl + shift + P` or `cmd + shift + P` on a mac is particularly useful as it brings up a command palette into which you can type what you wish to do and execute it. Refer to this blog article [Five tips to get you started with Jupyter notebooks](https://blogs.esri.com/esri/arcgis/2017/06/30/82220/) to get further understanding on patterns to follow while using Jupyter notebooks."]}], "metadata": {"anaconda-cloud": {}, "kernelspec": {"display_name": "Python 3", "language": "python", "name": "python3"}, "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.8.2"}, "toc": {"base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": true, "toc_position": {}, "toc_section_display": true, "toc_window_display": true}}, "nbformat": 4, "nbformat_minor": 1}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using the Jupyter Notebook environment\n",
"\n",
"This section provides a quick introduction to the Jupyter Notebook environment where you can run Python code in an interactive manner and visualize the output as maps and charts. Refer to the [official Jupyter documentation](http://jupyter.readthedocs.io/en/latest/) and [this quick start guide](https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/index.html) for further details."
]
},
{
"cell_type": "markdown",
"metadata": {
"toc": true
},
"source": [
"<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n",
"<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#Using-the-Jupyter-Notebook-environment\" data-toc-modified-id=\"Using-the-Jupyter-Notebook-environment-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>Using the Jupyter Notebook environment</a></span><ul class=\"toc-item\"><li><span><a href=\"#Starting-the-Jupyter-Notebook-environment\" data-toc-modified-id=\"Starting-the-Jupyter-Notebook-environment-1.1\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>Starting the Jupyter Notebook environment</a></span></li><li><span><a href=\"#Running-the-sample-notebooks\" data-toc-modified-id=\"Running-the-sample-notebooks-1.2\"><span class=\"toc-item-num\">1.2&nbsp;&nbsp;</span>Running the sample notebooks</a></span></li><li><span><a href=\"#Creating-new-notebooks\" data-toc-modified-id=\"Creating-new-notebooks-1.3\"><span class=\"toc-item-num\">1.3&nbsp;&nbsp;</span>Creating new notebooks</a></span></li><li><span><a href=\"#Further-help-and-keyboard-shortcuts\" data-toc-modified-id=\"Further-help-and-keyboard-shortcuts-1.4\"><span class=\"toc-item-num\">1.4&nbsp;&nbsp;</span>Further help and keyboard shortcuts</a></span></li></ul></li></ul></div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Starting the Jupyter Notebook environment\n",
"\n",
"Once conda and the ArcGIS API for Python is [installed](https://developers.arcgis.com/python/guide/install-and-set-up), you can start the Jupyter Notebook environment by typing the following command in your terminal.\n",
"\n",
" jupyter notebook\n",
"\n",
"If you are running a Windows OS, this could be your command prompt or PowerShell window. Similarly if you are running a Mac or Linux OS, this could be your terminal. Below is a screen shot of how it would appear if you were running the command from Windows command prompt."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Windows command prompt running jupyter notebook](../../static/img/guide_getstarted_usingjupyternotebooks_01.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you installed the ArcGIS API for Python in a conda **environment** other than root (which is the default), you need to `activate` that environment before starting the Jupyter Notebook. For more information on the benefits of using environments and how to create and manage them, refer to this [official documentation page](http://conda.pydata.org/docs/using/envs.html).\n",
"\n",
"If you are running a sample notebook for the API, you need to 'cd' into the directory where you [downloaded the samples](https://github.com/Esri/arcgis-python-api/releases/tag/v0.3-beta). In the example above, the samples have been downloaded and extracted into c:\\code directory.\n",
"\n",
"The command starts Jupyter Notebook and opens it in your default web browser as shown below."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Jupyter Notebook web application](../../static/img/guide_getstarted_usingjupyternotebooks_02.png)\n",
"\n",
"The page you see in this image is called the Notebook Dashboard."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Running the sample notebooks\n",
"\n",
"In the Jupyter Notebook, you can navigate the folder structure and click on a sample notebook. This opens the notebook in a new tab or window. You can run each cell by selecting it and clicking on the 'run cell' button. Alternately, you can run a cell using the keyboard shortcut `shift + enter`. The animation below shows these steps in action."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![running a sample notebook](../../static/img/guide_getstarted_usingjupyternotebooks_03.gif)\n",
"\n",
"When a cell is executing the cell number turns to an asterisk `(*)` and the circle next to the kernal name (Python 3 in the gif above) turns solid."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Creating new notebooks\n",
"\n",
"In addition to running the sample notebooks, you can create new notebooks for your projects. To do so, from the Notebook Dashboard page, click on the 'New' button and select a Python kernel of choice as shown in the image below.\n",
"\n",
"![creating new notebooks](../../static/img/guide_getstarted_usingjupyternotebooks_04.png)\n",
"\n",
"Alternately, you can create new notebooks from the 'File' menu of a running notebook. In the screenshot above, note the icons of currently running notebooks are green in color."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Further help and keyboard shortcuts\n",
"\n",
"You can get a tour of the notebook interface from the `Help -> User Interface Tour` menu. As you get used to this new interface, you can enhance your productivity by learning a few keyboard shortcuts. Accessing `Help > Keyboard shortcuts` from a running notebook will bring up a help dialog as shown below.\n",
"\n",
"![keyboard shortcuts](../../static/img/guide_getstarted_usingjupyternotebooks_05.png)\n",
"\n",
"Among the shortcuts, `ctrl + shift + P` or `cmd + shift + P` on a mac is particularly useful as it brings up a command palette into which you can type what you wish to do and execute it. Refer to this blog article [Five tips to get you started with Jupyter notebooks](https://blogs.esri.com/esri/arcgis/2017/06/30/82220/) to get further understanding on patterns to follow while using Jupyter notebooks."
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"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.8"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": true,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": true
}
},
"nbformat": 4,
"nbformat_minor": 4
}

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions guide/04-feature-data-and-analysis/appending-features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,18 @@
],
"source": [
"m = gis.map(\"Downingtown, PA\")\n",
"m.center = [40.0065, -75.7033]\n",
"m.zoom = 14\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"m.zoom = 14"
]
},
{
"cell_type": "code",
"execution_count": 19,
Expand All @@ -371,8 +378,7 @@
"metadata": {},
"outputs": [],
"source": [
"m.zoom = 16\n",
"m.center = [39.9975, -75.7173]"
"m.zoom = 16"
]
},
{
Expand Down Expand Up @@ -538,8 +544,6 @@
],
"source": [
"m2 = gis.map(\"Downingtown, PA\")\n",
"m2.center = [40.0065, -75.7033]\n",
"m2.zoom = 14\n",
"m2"
]
},
Expand All @@ -549,8 +553,7 @@
"metadata": {},
"outputs": [],
"source": [
"m2.zoom = 16\n",
"m2.center = [39.9975, -75.7173]"
"m2.zoom = 16"
]
},
{
Expand Down Expand Up @@ -3373,7 +3376,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -3387,7 +3390,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.11"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand All @@ -3404,5 +3407,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
],
"source": [
"search_result = gis.content.search(\"Big bear\", \"feature collection\", max_items=1)\n",
"search_result = gis.content.search(\"Big bear\", \"feature service\", max_items=1)\n",
"bigbear_item = search_result[0]\n",
"bigbear_item"
]
Expand Down Expand Up @@ -157,7 +157,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand All @@ -174,5 +174,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
1,470 changes: 1,469 additions & 1 deletion guide/04-feature-data-and-analysis/editing-features.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions guide/04-feature-data-and-analysis/features-module.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand All @@ -95,5 +95,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
{
"cell_type": "markdown",
"id": "086b5574",
"metadata": {
"toc": true
},
Expand Down Expand Up @@ -362,7 +363,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.11 ('arcgispro-py3')",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -376,7 +377,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.11.8"
},
"toc": {
"base_numbering": 1,
Expand Down
Loading

0 comments on commit 3a20b5c

Please sign in to comment.