Skip to content

Commit bfd0097

Browse files
type
1 parent 87e2be7 commit bfd0097

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

samples/05_content_publishers/publishing_sd_shapefiles_and_csv.ipynb

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
"root_folder = gis.content.folders.get()\n",
209209
"# Loop through each file and publish it as a service\n",
210210
"for current_sd_file in sd_file_list:\n",
211-
" item = root_folder.add({\"title\": \"New Layer\", \"item_type\": \"Service Definition\"}, data_dir + current_sd_file).result() # .sd file is uploaded and a .sd file item is created\n",
211+
" item = root_folder.add({\"title\": \"New Layer\", \"type\": \"Service Definition\"}, data_dir + current_sd_file).result() # .sd file is uploaded and a .sd file item is created\n",
212212
" if \"BuildCache\" not in current_sd_file:\n",
213213
" published_item = item.publish() # .sd file item is published and a web layer item is created\n",
214214
" else:\n",
@@ -276,7 +276,7 @@
276276
],
277277
"source": [
278278
"proot_folder = p_gis.content.folders.get()\n",
279-
"uploaded_file = proot_folder.add({\"title\": \"Nursing Home Location\", \"item_type\": \"Service Definition\"}, file=sd_file).result()\n",
279+
"uploaded_file = proot_folder.add({\"title\": \"Nursing Home Location\", \"type\": \"Service Definition\"}, file=sd_file).result()\n",
280280
"uploaded_file.tags"
281281
]
282282
},
@@ -387,7 +387,7 @@
387387
"outputs": [],
388388
"source": [
389389
"data = \"data/power_pedestals_2012.zip\"\n",
390-
"shpfile = root_folder.add({\"title\": \"power_pedestals_2012\", \"item_type\": \"Shapefile\"}, data).result()"
390+
"shpfile = root_folder.add({\"title\": \"power_pedestals_2012\", \"type\": \"Shapefile\"}, data).result()"
391391
]
392392
},
393393
{
@@ -556,7 +556,7 @@
556556
"outputs": [],
557557
"source": [
558558
"csv_file = 'data/Chennai_precipitation.csv'\n",
559-
"csv_item = root_folder.add({\"title\": \"Chennai Precipitation\", \"item_type\": \"CSV\"}, csv_file).result()"
559+
"csv_item = root_folder.add({\"title\": \"Chennai Precipitation\", \"type\": \"CSV\"}, csv_file).result()"
560560
]
561561
},
562562
{
@@ -652,7 +652,10 @@
652652
{
653653
"cell_type": "markdown",
654654
"metadata": {
655-
"collapsed": true
655+
"collapsed": true,
656+
"jupyter": {
657+
"outputs_hidden": true
658+
}
656659
},
657660
"source": [
658661
"### Create a new folder for the items\n",
@@ -708,7 +711,10 @@
708711
{
709712
"cell_type": "markdown",
710713
"metadata": {
711-
"collapsed": true
714+
"collapsed": true,
715+
"jupyter": {
716+
"outputs_hidden": true
717+
}
712718
},
713719
"source": [
714720
"Now that the items are moved, we can request for the item's `ownerFolder` property and ensure it matches the `id` of the folder created in the previous step"
@@ -739,7 +745,7 @@
739745
"notebookRuntimeVersion": "4.0"
740746
},
741747
"kernelspec": {
742-
"display_name": "Python 3",
748+
"display_name": "Python 3 (ipykernel)",
743749
"language": "python",
744750
"name": "python3"
745751
},
@@ -753,7 +759,7 @@
753759
"name": "python",
754760
"nbconvert_exporter": "python",
755761
"pygments_lexer": "ipython3",
756-
"version": "3.11.8"
762+
"version": "3.11.0"
757763
},
758764
"toc": {
759765
"base_numbering": 1,
@@ -799,5 +805,5 @@
799805
}
800806
},
801807
"nbformat": 4,
802-
"nbformat_minor": 1
808+
"nbformat_minor": 4
803809
}

0 commit comments

Comments
 (0)