Skip to content

Commit 853847b

Browse files
jyaistMaprohitgeo
authored andcommitted
Fixed error in import solution notebook (Esri#144)
* added underscores to zipfile in download/import * corrected notebooks.esri.com url.
1 parent af63a15 commit 853847b

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

labs/display-web-map.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@
3030
},
3131
{
3232
"cell_type": "code",
33-
"execution_count": 2,
33+
"execution_count": 11,
3434
"metadata": {},
3535
"outputs": [
3636
{
3737
"data": {
3838
"text/plain": [
3939
"[<Item title:\"Tree Canopy by City in Minnesota\" type:Web Map owner:vikalpa>,\n",
40+
" <Item title:\"Vaals6\" type:Web Map owner:haicao1975>,\n",
41+
" <Item title:\"San Diego Places To Go-复制\" type:Web Map owner:win_001>,\n",
42+
" <Item title:\"Location Map Telematica\" type:Web Map owner:roberto.arbanil>,\n",
4043
" <Item title:\"San Diego Shortlist-Copy\" type:Web Map owner:opsdashboarddemo>,\n",
4144
" <Item title:\"LA Parks and Trails Map (styled with popups)c\" type:Web Map owner:cheangerlove>,\n",
42-
" <Item title:\"Location Map Telematica\" type:Web Map owner:roberto.arbanil>,\n",
43-
" <Item title:\"Vaals6\" type:Web Map owner:haicao1975>,\n",
4445
" <Item title:\"ADFCA Short List Map Story\" type:Web Map owner:developer5>,\n",
45-
" <Item title:\"San Diego Places To Go-复制\" type:Web Map owner:win_001>,\n",
4646
" <Item title:\"San Diego Places To Go-Copy\" type:Web Map owner:hayam_osama>,\n",
4747
" <Item title:\"Vaals9\" type:Web Map owner:haicao1975>,\n",
4848
" <Item title:\"San Diego Shortlist-Copia\" type:Web Map owner:paoloprova>]"
4949
]
5050
},
51-
"execution_count": 2,
51+
"execution_count": 11,
5252
"metadata": {},
5353
"output_type": "execute_result"
5454
}
@@ -67,7 +67,7 @@
6767
},
6868
{
6969
"cell_type": "code",
70-
"execution_count": 3,
70+
"execution_count": 12,
7171
"metadata": {},
7272
"outputs": [
7373
{
@@ -94,13 +94,13 @@
9494
"<Item title:\"LA Parks and Trails Map (styled with popups)c\" type:Web Map owner:cheangerlove>"
9595
]
9696
},
97-
"execution_count": 3,
97+
"execution_count": 12,
9898
"metadata": {},
9999
"output_type": "execute_result"
100100
}
101101
],
102102
"source": [
103-
"webmap = webmaps[2]\n",
103+
"webmap = webmaps[5]\n",
104104
"webmap"
105105
]
106106
},

labs/download_data.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
{
1818
"cell_type": "code",
19-
"execution_count": 1,
19+
"execution_count": 8,
2020
"metadata": {
2121
"collapsed": true
2222
},
@@ -60,16 +60,16 @@
6060
"<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
6161
" <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
6262
" <a href='http://www.arcgis.com/home/item.html?id=a04933c045714492bda6886f355416f2' target='_blank'>\n",
63-
" <img src='http://www.arcgis.com/sharing/rest//content/items/a04933c045714492bda6886f355416f2/info/thumbnail/la_hub_data_thumb.png' class=\"itemThumbnail\">\n",
63+
" <img src='http://www.arcgis.com/sharing/rest//content/items/a04933c045714492bda6886f355416f2/info/thumbnail/thumbnail.png' class=\"itemThumbnail\">\n",
6464
" </a>\n",
6565
" </div>\n",
6666
"\n",
6767
" <div class=\"item_right\" style=\"float: none; width: auto; overflow: hidden;\">\n",
6868
" <a href='http://www.arcgis.com/home/item.html?id=a04933c045714492bda6886f355416f2' target='_blank'><b>LA_Hub_Datasets</b>\n",
6969
" </a>\n",
7070
" <br/>Datasets for ArcGIS DevLabs<img src='http://www.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/layers16.png' style=\"vertical-align:middle;\">Code Sample by esri_devlabs\n",
71-
" <br/>Last Modified: June 22, 2017\n",
72-
" <br/>0 comments, 1,540 views\n",
71+
" <br/>Last Modified: October 09, 2017\n",
72+
" <br/>0 comments, 1,605 views\n",
7373
" </div>\n",
7474
" </div>\n",
7575
" "
@@ -128,7 +128,7 @@
128128
{
129129
"data": {
130130
"text/plain": [
131-
"['__MACOSX', 'Parks and Open Space.zip', 'Trailheads.csv', 'Trails.geojson']"
131+
"['Parks_and_Open_Space.zip', 'Trails.geojson', '__MACOSX', 'Trailheads.csv']"
132132
]
133133
},
134134
"execution_count": 7,

labs/import_data.ipynb

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"source": [
1515
"### Important note\n",
1616
"\n",
17-
"If you have not completed the [Download data lab](https://developers.arcgis.com/labs/python/download-data), the code in the **The Download Data Lab** cell immediately below must be run before the **Import Data Lab** cells will run. These cells contain the code in the ArcGIS API for Python [Download data lab solution](download_data.ipynb). The LA_Hub_Datasets.zip directory from which you import data is only available in a single notebook.esri.com session.\n",
17+
"If you have not completed the [Download data lab](https://developers.arcgis.com/labs/python/download-data), the code in the **The Download Data Lab** cell immediately below must be run before the **Import Data Lab** cells will run. These cells contain the code in the ArcGIS API for Python [Download data lab solution](download_data.ipynb). The LA_Hub_Datasets.zip directory from which you import data is only available in a single notebooks.esri.com session.\n",
1818
"\n",
19-
"If you have completed the [Download data lab](https://developers.arcgis.com/labs/python/download-data) and are still in that notebooks.esri.com session, skip to [The Import Data Lab](#import_section) section of this lab."
19+
"If you have completed the [Download data lab](https://developers.arcgis.com/labs/python/download-data) and are still in that notebook, skip to [The Import Data Lab](#import_section) section of this lab."
2020
]
2121
},
2222
{
@@ -41,24 +41,25 @@
4141
}
4242
],
4343
"source": [
44-
"from arcgis.gis import GIS\n",
4544
"import getpass\n",
4645
"\n",
4746
"password = getpass.getpass(\"Enter password, please: \")\n",
48-
"dev_gis = GIS('https://arcgis.com', 'username', password)"
47+
"gis = GIS('https://arcgis.com', 'username', password)"
4948
]
5049
},
5150
{
5251
"cell_type": "code",
5352
"execution_count": 17,
54-
"metadata": {},
53+
"metadata": {
54+
"collapsed": true
55+
},
5556
"outputs": [],
5657
"source": [
5758
"parks_properties = {'title': 'Parks and Open Space',\n",
5859
" 'tags': 'parks, open data, devlabs',\n",
5960
" 'type': 'Shapefile'}\n",
60-
"parks_shp = dev_gis.content.add(parks_properties,\n",
61-
" data='./LA_Hub_datasets/Parks and Open Space.zip')"
61+
"parks_shp = gis.content.add(parks_properties,\n",
62+
" data='./LA_Hub_datasets/Parks_and_Open_Space.zip')"
6263
]
6364
},
6465
{
@@ -102,7 +103,9 @@
102103
{
103104
"cell_type": "code",
104105
"execution_count": 19,
105-
"metadata": {},
106+
"metadata": {
107+
"collapsed": true
108+
},
106109
"outputs": [],
107110
"source": [
108111
"parks_feature_layer = parks_shp.publish()"

0 commit comments

Comments
 (0)