Skip to content

Commit 1366680

Browse files
author
Atma Mani
committed
Merge branch 'dev' of https://github.com/atmamani/arcgis-python-api into dev
2 parents dc5c21e + f3a17db commit 1366680

20 files changed

+1736
-1672
lines changed

guide/gis module/Authentication.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
],
7777
"source": [
7878
"print(\"ArcGIS Online Org account\") \n",
79-
"gis = GIS(\"https://portalname.domain.com/webcontext\", \"demo_deldev\", \"password\")\n",
79+
"gis = GIS(\"https://www.arcgis.com\", \"demo_deldev\", \"password\")\n",
8080
"print(\"Logged in as \" + str(gis.properties.user.username))"
8181
]
8282
},

guide/gis module/class gis.Group.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,11 +551,11 @@
551551
"bytes that represent the image.\n",
552552
"\n",
553553
"**Example:**\n",
554-
"<code>\n",
555-
"response = group.get_thumbnail()\n",
556-
"f = open(filename, 'wb')\n",
557-
"f.write(response)\n",
558-
"</code>"
554+
"```PYTHON\n",
555+
"with open(filename, 'wb') as f:\n",
556+
" response = group.get_thumbnail()\n",
557+
" f.write(response)\n",
558+
"```"
559559
]
560560
},
561561
{

samples/01 Get Started/Overview.ipynb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@
66
"source": [
77
"# Samples\n",
88
"\n",
9-
"These samples demonstrate various features of the ArcGIS Python API. The samples are categorized by the user profile they are most relevant to. Each sample is in the form of a [Jupyter Notebook](http://jupyter-notebook.readthedocs.io/en/latest/notebook.html), that can be viewed online, or downloaded and run interactively. See the [Getting Started](https://developers.arcgis.com/python/guide/Install-and-set-up/) section in the Guide to learn how to download and run the sample notebooks on your computer.\n",
9+
"These samples demonstrate various features of the ArcGIS Python API. The samples are categorized by the user profile they are most relevant to. Each sample is in the form of a [Jupyter Notebook](http://jupyter-notebook.readthedocs.io/en/latest/notebook.html), that can be viewed online, or downloaded and run interactively. \n",
1010
"\n",
11-
"The sample notebooks contain Python code along with narrative text and rich media (images, videos, widgets, etc). The result of code execution is captured and presented along with the code, using rich media representations. This makes the notebook format a great way to record the steps of your analysis, and present and share the results of your analysis with others.\n",
11+
"## Download and run the sample notebooks\n",
12+
"To run the sample notebooks locally, you need the ArcGIS Python API installed on your computer. See the [Getting Started](https://developers.arcgis.com/python/guide/Install-and-set-up/) section in the Guide to learn how to download and run the API.\n",
13+
"\n",
14+
"Once the API is installed, you can download the samples either as an [archive](https://github.com/Esri/arcgis-python-api/archive/v0.3-beta.zip) or clone the [arcgis-python-api](https://github.com/Esri/arcgis-python-api) GitHub repository. \n",
15+
"\n",
16+
"Next, extract the archive if you downloaded as an archive then open your terminal application and enter the directory with the samples. Then start Jupyter notebook application. Refer to [Using the Jupyter Notebook environment](https://developers.arcgis.com/python/guide/Using-the-Jupyter-Notebook-environment) tutorial in the Guide for instructions on how to do this and to get yourself familiar with the notebook environment.\n",
17+
"\n",
18+
"## List of sample notebooks\n",
19+
"The sample notebooks contain Python code along with narrative text and rich media (images, videos, widgets, etc). The output from code execution is captured and presented along with the code, using rich media representations. This makes the notebook format a great way to record the steps of your analysis, and present and share the results of your analysis with others.\n",
1220
"\n",
1321
"The samples illustrate some of the following functionality (and much more):\n",
1422
"\n",
@@ -36,9 +44,7 @@
3644
"* Creating Raster Information Product using Raster GeoAnalytics\n",
3745
"* Publishing SDs, Shapefiles and CSVs\n",
3846
"* Publishing web maps and web scenes\n",
39-
"* Using and updating GIS content\n",
40-
"\n",
41-
"You can also [download all samples](https://github.com/Esri/arcgis-python-api/archive/v0.2-beta.zip) from the [arcgis-python-api](https://github.com/Esri/arcgis-python-api) GitHub repository, and run them interactively on your computer."
47+
"* Using and updating GIS content"
4248
]
4349
}
4450
],

samples/02 Power Users & Developers/Smart Mapping.ipynb

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"Refer here for instructions to [download and run this sample locally](https://developers.arcgis.com/python/sample-notebooks/#Download-and-run-the-sample-notebooks) on your computer"
8+
]
9+
},
310
{
411
"cell_type": "markdown",
512
"metadata": {},
@@ -15,9 +22,9 @@
1522
"metadata": {},
1623
"source": [
1724
"## Visualizing line features\n",
18-
"The first sample shows some ideas to visualize linear features using a hurricane track data. When you add an item to your map, the map widget visualizes using the default symbology of the item. In this sample, you will see how you can use **smart mapping** to better visualize the same layer.\n",
25+
"The first sample shows some ideas to visualize linear features using streets data. When you add an item to your map, the map widget visualizes using the default symbology of the item. In this sample, you will see how you can use **smart mapping** to better visualize the same layer.\n",
1926
"\n",
20-
"You can re add the layer by passing the URL to the layer and specifying how you want the layer rendered. In this sample we will use **ClassSizeRenderer** to emphasize differences in value by varying the thickness of line features."
27+
"You can add the layer back to the map by passing the URL to the layer and specifying how you want the layer rendered. In this sample we will use **ClassSizeRenderer** to emphasize differences in value by varying the thickness of line features."
2128
]
2229
},
2330
{
@@ -98,12 +105,12 @@
98105
"cell_type": "code",
99106
"execution_count": 5,
100107
"metadata": {
101-
"collapsed": true
108+
"collapsed": false
102109
},
103110
"outputs": [],
104111
"source": [
105112
"import arcgis.lyr\n",
106-
"freeway_feature_service = arcgis.lyr.FeatureService(freeway_item.url)"
113+
"freeway_feature_service = arcgis.lyr.FeatureService(freeway_item.url, gis)"
107114
]
108115
},
109116
{
@@ -293,15 +300,6 @@
293300
" \"renderer\":\"HeatmapRenderer\",\n",
294301
" \"opacity\":0.75})"
295302
]
296-
},
297-
{
298-
"cell_type": "code",
299-
"execution_count": null,
300-
"metadata": {
301-
"collapsed": true
302-
},
303-
"outputs": [],
304-
"source": []
305303
}
306304
],
307305
"metadata": {
@@ -322,32 +320,6 @@
322320
"nbconvert_exporter": "python",
323321
"pygments_lexer": "ipython3",
324322
"version": "3.5.2"
325-
},
326-
"widgets": {
327-
"state": {
328-
"35942984559e4cb1bf11d7d73960b5d1": {
329-
"views": [
330-
{
331-
"cell_index": 3
332-
}
333-
]
334-
},
335-
"580de5cf9dfd4d5fa2d11492a0fcd172": {
336-
"views": [
337-
{
338-
"cell_index": 22
339-
}
340-
]
341-
},
342-
"c63ba306c7b3467eae3f72f9130ba005": {
343-
"views": [
344-
{
345-
"cell_index": 17
346-
}
347-
]
348-
}
349-
},
350-
"version": "1.2.0"
351323
}
352324
},
353325
"nbformat": 4,

0 commit comments

Comments
 (0)