From bfd009784d224e0c2ea6c20b67fe4d8077946e15 Mon Sep 17 00:00:00 2001 From: Shuang Song <103439749+cariashuang0417@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:54:23 -0400 Subject: [PATCH] type --- .../publishing_sd_shapefiles_and_csv.ipynb | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/samples/05_content_publishers/publishing_sd_shapefiles_and_csv.ipynb b/samples/05_content_publishers/publishing_sd_shapefiles_and_csv.ipynb index 7ade315a7..86bfd7ac4 100644 --- a/samples/05_content_publishers/publishing_sd_shapefiles_and_csv.ipynb +++ b/samples/05_content_publishers/publishing_sd_shapefiles_and_csv.ipynb @@ -208,7 +208,7 @@ "root_folder = gis.content.folders.get()\n", "# Loop through each file and publish it as a service\n", "for current_sd_file in sd_file_list:\n", - " 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", + " 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", " if \"BuildCache\" not in current_sd_file:\n", " published_item = item.publish() # .sd file item is published and a web layer item is created\n", " else:\n", @@ -276,7 +276,7 @@ ], "source": [ "proot_folder = p_gis.content.folders.get()\n", - "uploaded_file = proot_folder.add({\"title\": \"Nursing Home Location\", \"item_type\": \"Service Definition\"}, file=sd_file).result()\n", + "uploaded_file = proot_folder.add({\"title\": \"Nursing Home Location\", \"type\": \"Service Definition\"}, file=sd_file).result()\n", "uploaded_file.tags" ] }, @@ -387,7 +387,7 @@ "outputs": [], "source": [ "data = \"data/power_pedestals_2012.zip\"\n", - "shpfile = root_folder.add({\"title\": \"power_pedestals_2012\", \"item_type\": \"Shapefile\"}, data).result()" + "shpfile = root_folder.add({\"title\": \"power_pedestals_2012\", \"type\": \"Shapefile\"}, data).result()" ] }, { @@ -556,7 +556,7 @@ "outputs": [], "source": [ "csv_file = 'data/Chennai_precipitation.csv'\n", - "csv_item = root_folder.add({\"title\": \"Chennai Precipitation\", \"item_type\": \"CSV\"}, csv_file).result()" + "csv_item = root_folder.add({\"title\": \"Chennai Precipitation\", \"type\": \"CSV\"}, csv_file).result()" ] }, { @@ -652,7 +652,10 @@ { "cell_type": "markdown", "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "source": [ "### Create a new folder for the items\n", @@ -708,7 +711,10 @@ { "cell_type": "markdown", "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "source": [ "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 @@ "notebookRuntimeVersion": "4.0" }, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -753,7 +759,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.8" + "version": "3.11.0" }, "toc": { "base_numbering": 1, @@ -799,5 +805,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 }