diff --git a/guide/03-the-gis/accessing-and-creating-content.ipynb b/guide/03-the-gis/accessing-and-creating-content.ipynb index 34aba9d15a..0536849f9c 100644 --- a/guide/03-the-gis/accessing-and-creating-content.ipynb +++ b/guide/03-the-gis/accessing-and-creating-content.ipynb @@ -30,7 +30,20 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\tar12555\\AppData\\Local\\ESRI\\conda\\envs\\pyapi-dev\\lib\\site-packages\\numpy\\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:\n", + "C:\\Users\\tar12555\\AppData\\Local\\ESRI\\conda\\envs\\pyapi-dev\\lib\\site-packages\\numpy\\.libs\\libopenblas64__v0.3.23-246-g3d31191b-gcc_10_3_0.dll\n", + "C:\\Users\\tar12555\\AppData\\Local\\ESRI\\conda\\envs\\pyapi-dev\\lib\\site-packages\\numpy\\.libs\\libopenblas64__v0.3.23-gcc_10_3_0.dll\n", + " warnings.warn(\"loaded more than 1 DLL from .libs:\"\n", + "C:\\Users\\tar12555\\AppData\\Local\\ESRI\\conda\\envs\\pyapi-dev\\lib\\site-packages\\scipy\\__init__.py:138: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.25.2)\n", + " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion} is required for this version of \"\n" + ] + } + ], "source": [ "import os\n", "import datetime as dt\n", @@ -62,31 +75,40 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Log into ArcGIS Online\n", - "gis = GIS('home')" + "gis = GIS(profile='your_online_profile')" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ]" + "[,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ]" ] }, - "execution_count": 4, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -181,7 +203,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -201,7 +223,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -222,7 +244,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -232,16 +254,14 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Item Title Item Type Published \n", - " downingtown_fgdb_1558728756 Feature Service May 30 2019 at 04:52.42 PM \n", - " downingtown_fgdb_1558728756 File Geodatabase May 30 2019 at 04:52.39 PM \n" + "Item Title Item Type Published \n" ] } ], @@ -274,12 +294,12 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "from arcgis.gis import GIS\n", - "gis = GIS(url='https://pythonapi.playground.esri.com/portal', username='arcgis_python', password='amazing_arcgis_123')" + "gis = GIS(profile=\"your_enterprise_profile\")" ] }, { @@ -291,7 +311,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -300,7 +320,7 @@ "arcgis.gis.ContentManager" ] }, - "execution_count": 60, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -318,7 +338,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -327,7 +347,7 @@ "[]" ] }, - "execution_count": 5, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -346,25 +366,25 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ]" + "[,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ]" ] }, - "execution_count": 62, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -384,18 +404,25 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[,\n", - " ,\n", - " ]" + "[,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ]" ] }, - "execution_count": 64, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -416,22 +443,25 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ]" + "[,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ]" ] }, - "execution_count": 65, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -451,25 +481,25 @@ }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ,\n", - " ]" + "[,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ]" ] }, - "execution_count": 66, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -491,7 +521,7 @@ }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -499,23 +529,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Historic Sites\n", + " USA Major Cities\n", " \n", - "
Historic Sites from the Protected Areas Database of the United States.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This layer presents the locations of cities within United States with populations of 10,000 or greater (based on Census 2000 figures), all state capitals, and the national capital.Web Map by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -526,23 +556,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Federal Lands\n", + " USA Protected Areas - Public Access\n", " \n", - "
This layer displays lands in the United States managed by six federal agencies.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This vector tile layer displays public access from the USGS Protected Areas Database of the United States version 3.0.Vector Tile Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -553,23 +583,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Wilderness\n", + " USA Official Protraction Diagrams\n", " \n", - "
This layer displays lands protected by the National Wilderness Preservation System of the United States.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
USA Protraction Polygons based on the OCS Marine Survey Group Official Protraction Diagram.Feature Layer Collection by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -580,23 +610,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Protected Areas\n", + " USA SSURGO - Nonirrigated Capability Class\n", " \n", - "
This layer displays all lands contained in the Protected Areas Database of the United States.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
Suitability of soil for practical use (such as agriculture) when irrigation is not used.Imagery Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -607,23 +637,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Native Lands\n", + " USA Forest Service Lands\n", " \n", - "
This layer displays lands owned or managed by Native American Tribes and other native people of the United States.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
Lands managed by the United States Forest Service including National Forests and National Grasslands.Imagery Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -634,23 +664,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Critical Habitat\n", + " USA Protected Areas - Protection Mechanism Category\n", " \n", - "
Proposed and Final Critical Habitat designated under the U.S. Endangered Species Act.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This vector tile layer displays protection mechanism category from the USGS Protected Areas Database of the United States version 3.0.Vector Tile Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -661,23 +691,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Topo Maps\n", + " 2020 USA Per Capita Income\n", " \n", - "
This layer presents detailed USGS topographic maps for the United States at multiple scales. Map Image Layer by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This layer shows per capita income (income per person) in the U.S. in 2020 in a multiscale map by country, state, county, ZIP Code, tract, and block group. ArcGIS Online subscription required.Map Image Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -688,23 +718,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Bureau of Reclamation Lands\n", + " USA Protected Areas - GAP Status 2\n", " \n", - "
This layer displays lands managed by the U.S. Bureau of Reclamation.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This imagery layer displays lands managed for biodiversity in the United States. Natural disturbances on these lands are suppressed.Imagery Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -715,23 +745,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Department of Defense Lands\n", + " 2021 USA Child Care Spending\n", " \n", - "
This layer displays lands managed by the U.S. Department of Defense.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This layer shows the average amount spent on child care per household in the U.S. in 2021, by country, state, county, ZIP Code, tract, and block group. ArcGIS Online subscription required.Map Image Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -742,23 +772,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Forest Service Lands\n", + " 2020 USA Unemployment Rate\n", " \n", - "
Lands managed by the United States Forest Service including National Forests and National Grasslands.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This layer shows unemployment rates in the United States in 2020 in a multiscale map by country, state, county, ZIP Code, tract, and block group. ArcGIS Online subscription required.Map Image Layer by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -780,14 +810,14 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "d530f9ac148f45ddbcfa6f479931aebc\n" + "c7a0023f7c0a424e8bdff6d77c877f20\n" ] } ], @@ -800,7 +830,7 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -808,26 +838,26 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " USA Historic Sites\n", + " USA Major Cities\n", " \n", - "
Historic Sites from the Protected Areas Database of the United States.Feature Layer Collection by esri_livingatlas\n", - "
Last Modified: January 14, 2019\n", + "
This layer presents the locations of cities within United States with populations of 10,000 or greater (based on Census 2000 figures), all state capitals, and the national capital.Web Map by esri_livingatlas\n", + "
Last Modified: December 02, 2022\n", "
0 comments, 0 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, - "execution_count": 69, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -848,12 +878,12 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# connect to ArcGIS Online\n", - "gis2 = GIS('home')" + "gis2 = GIS(profile=\"your_online_profile\")" ] }, { @@ -865,7 +895,7 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -873,23 +903,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " 3D Cities - Nederland\n", + " Invozone_Catalyst_Cities_5bba6\n", " \n", - "
Deze webscene bevat 3D-gebouwen van een aantal gemeenten. De gebouwen van deze gemeenten hebben het LOD2 detailniveau. Dit wil zeggen dat het gebouwen zijn met dakvorm.Web Scene by Esri_NL_Content\n", - "
Last Modified: May 28, 2019\n", - "
0 comments, 4,942 views\n", + "
Invozone_Catalyst_CitiesWeb Scene by viewproguest\n", + "
Last Modified: June 28, 2021\n", + "
0 comments, 854704 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -900,23 +930,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " 3D Gebouwhoogte NL\n", + " Capital City 3D (Web 2.0)\n", " \n", - "
Deze web scene bevat een global scene layer die gebaseerd is op de 3D Gebouwhoogte NL van het Kadaster, waarin de hoogte uit het AHN2 aan de gebouwen van de TOP10NL is gekoppeld.Web Scene by Esri_NL_Content\n", - "
Last Modified: May 28, 2019\n", - "
0 comments, 1,707 views\n", + "
Web Scene by mat.sedgwick\n", + "
Last Modified: October 24, 2022\n", + "
0 comments, 550828 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -927,23 +957,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " BAG 3D - Nederland\n", + " Visualize New Developments\n", " \n", - "
Deze scene bevat de BAG-gebouwen in 3D in Nederland. Via de dia's onderin is het mogelijk om naar een andere provincie te navigeren.Web Scene by Esri_NL_Content\n", - "
Last Modified: May 28, 2019\n", - "
0 comments, 5,831 views\n", + "
Understand proposed changes in the context of your 3D City. Communicate changes with stakeholders and solicit public feedback.Web Scene by esri_3d\n", + "
Last Modified: July 20, 2022\n", + "
8 comments, 524723 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -954,23 +984,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Visualize New Developments\n", + " Maa-amet 3D\n", " \n", - "
Understand proposed changes in the context of your 3D City. Communicate changes with stakeholders and solicit public feedback.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
7 comments, 177,579 views\n", + "
Maa-ameti 3D kaardirakenduse stseen. Estonian Land Board 3D Web Scene.Web Scene by AndresKasekampMA\n", + "
Last Modified: September 22, 2023\n", + "
0 comments, 478363 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -981,23 +1011,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Berlin Alexanderplatz in 3D\n", + " CARTE 3D DE GENEVE\n", " \n", - "
Demo WebScene for the public transportation at Alexanderplatz, Berlin.Web Scene by O.Ertac4org\n", - "
Last Modified: May 23, 2018\n", - "
1 comments, 1,168 views\n", + "
Web Scene by sitg\n", + "
Last Modified: April 25, 2023\n", + "
0 comments, 458768 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1008,23 +1038,24 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Linz, Austria Scene\n", + " Satellite Maps 3D Scene 2023 - for website\n", " \n", - "
This scene highlights layers for Linz, Austria available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
1 comments, 11,417 views\n", + "
Satellite Maps 3D global with satellite imagery from GOES East, GOES West and NOAA-20\n", + "NOAA's two operational geostationary environmental satellites cover the western Pacific Ocean to the eastern Atlantic Ocean, while the operational polar-orbiting satellite circles the earth, providing coverage of the entire globe each day. The web map opens with GOES GeoColor day and night imagery. Select also infrared, water vapor, or the latest JPSS VIIRS daytime global map.Web Scene by rafael.deameller_noaa\n", + "
Last Modified: July 24, 2023\n", + "
0 comments, 163368 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1035,23 +1066,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Berlin, Germany Scene\n", + " Winter Sun Exposure\n", " \n", - "
This scene highlights layers for Berlin, Germany available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
0 comments, 37,762 views\n", + "
Scene of shadows cast by mountains on the Winter Solstice from the hours of 10:00 to 11:00 at 15 minute intervals.Web Scene by jsapi_team\n", + "
Last Modified: April 05, 2019\n", + "
0 comments, 158568 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1062,23 +1093,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Brest, France Scene\n", + " Capital City (Web 3D)\n", " \n", - "
This scene highlights layers for Brest, France available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
0 comments, 2,657 views\n", + "
Web Scene by msedgwick_Latitudegeo\n", + "
Last Modified: July 06, 2020\n", + "
0 comments, 130718 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1089,23 +1120,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Auckland, New Zealand Scene\n", + " Human Reach - City Populations\n", " \n", - "
This scene highlights layers for Auckland, New Zealand available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: October 30, 2018\n", - "
0 comments, 12,258 views\n", + "
Web Scene by whackney\n", + "
Last Modified: June 19, 2020\n", + "
0 comments, 122768 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1116,23 +1147,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Vancouver, Canada Scene\n", + " Boston development visualizations\n", " \n", - "
This scene highlights layers for Vancouver, Canada available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: June 08, 2017\n", - "
0 comments, 5,843 views\n", + "
Scene with development projects in the city of Boston.Web Scene by scene_viewer\n", + "
Last Modified: October 26, 2018\n", + "
0 comments, 111244 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1143,23 +1174,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Basel, Switzerland Scene\n", + " Berlin, Germany Scene\n", " \n", - "
This scene highlights layers for Basel, Switzerland available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: May 02, 2018\n", - "
0 comments, 4,893 views\n", + "
This scene highlights layers for Berlin, Germany available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", + "
Last Modified: May 01, 2020\n", + "
0 comments, 89468 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1170,23 +1201,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Rotterdam, the Netherlands Scene\n", + " GeoZone_webscene\n", " \n", - "
This scene highlights layers for Rotterdam, The Netherlands available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
0 comments, 37,129 views\n", + "
3D Map Portal for City of AubreyWeb Scene by viewpro_cityofaubrey\n", + "
Last Modified: March 29, 2023\n", + "
0 comments, 83349 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1197,23 +1228,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Portland, Oregon USA Scene\n", + " Rotterdam, the Netherlands Scene\n", " \n", - "
This scene highlights layers for Portland, Oregon available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
0 comments, 16,180 views\n", + "
This scene highlights layers for Rotterdam, The Netherlands available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", + "
Last Modified: May 01, 2020\n", + "
0 comments, 68416 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1224,23 +1255,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Hamburg, Germany Scene\n", + " City 3D\n", " \n", - "
This scene highlights layers for Hamburg, Germany available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
0 comments, 6,653 views\n", + "
City of Bayswater 3D - innovationWeb Scene by Bayswater53\n", + "
Last Modified: June 25, 2022\n", + "
0 comments, 67476 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1251,23 +1282,23 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Johannesburg, South Africa Scene\n", + " Webscene Saving Sample\n", " \n", - "
This scene highlights layers for Johannesburg, South Africa available in ArcGIS to support your work in 3D. Use these layers in conjunction with your own layers to create new scenes focused on a specific topic or area of interest to you.Web Scene by esri_3d\n", - "
Last Modified: April 30, 2018\n", - "
0 comments, 7,375 views\n", + "
Basic web scene used in the Save a web scene sample in the JavaScript API Samples.Web Scene by jsapi_team\n", + "
Last Modified: March 23, 2021\n", + "
0 comments, 55291 views\n", "
\n", "
\n", " " ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1276,7 +1307,7 @@ ], "source": [ "public_3d_city_scenes = gis2.content.search(query=\"3d cities\", item_type = \"web scene\",\n", - " sort_field=\"numViews\" ,sort_order=\"asc\",\n", + " sort_field=\"numViews\" ,sort_order=\"desc\",\n", " max_items = 15, outside_org=True)\n", "for item in public_3d_city_scenes:\n", " display(item)" @@ -1292,25 +1323,16 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "gis.content.search??" - ] - }, - { - "cell_type": "code", - "execution_count": 5, + "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "277" + "475" ] }, - "execution_count": 5, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -1323,16 +1345,16 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "277" + "475" ] }, - "execution_count": 6, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -1356,16 +1378,16 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "277" + "475" ] }, - "execution_count": 7, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -1378,7 +1400,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -1387,7 +1409,7 @@ "0" ] }, - "execution_count": 8, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -1413,7 +1435,7 @@ "source": [ "## Creating new content\n", "\n", - "To create new items on your GIS, you use the [`add()`](https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.add) method on a `ContentManager` instance. Again, rather than creating an instance of the `ContentManager` directly, the Python API implments the class as the `content` property of your `GIS` object.\n", + "To create new items on your GIS, you use the [`add()`](https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.add) method on a `ContentManager` instance. Again, rather than creating an instance of the `ContentManager` directly, the Python API implements the class as the `content` property of your `GIS` object.\n", "\n", "The `add()` method accepts a dictionary containing the properties of the item to be created. The optional `data` parameter accepts a string path to a file. You can use the optional `metadata` parameter to specify an XML file containing metadata information.\n", "\n", @@ -1425,16 +1447,42 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "data_path = (r\".\\data\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We are going to create an item titled \"Earthquakes around the world from 1800s to early 1900s\", but first let's see if there is any item already created with the same title by the current user, if it is then we'll delete it so that there are no duplicate items" + ] + }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "username = gis.users.me.username" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "for earthquakes_csv_item in gis.content.search(query=\"title:Earthquakes around the world from 1800s to early 1900s AND owner:\"+username):\n", + " earthquakes_csv_item.delete()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -1457,7 +1505,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -1465,16 +1513,16 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Earthquakes around the world from 1800s to early 1900s\n", + " Earthquakes around the world from 1800s to early 1900s\n", " \n", - "
CSV by arcgis_python\n", - "
Last Modified: May 28, 2019\n", + "
CSV by arcgis_python\n", + "
Last Modified: October 12, 2023\n", "
0 comments, 0 views\n", "
\n", "
\n", @@ -1484,7 +1532,7 @@ "" ] }, - "execution_count": 18, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -1507,14 +1555,14 @@ "### Publishing an item as a web layer\n", "In the example above you added a csv [`Item`](https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#item) to the portal. Items such as csv files, service definitions, file geodatabases, shapefiles and packages such as tile, scene and vector tile packages can be published into hosted web layers. You call the [`publish()`](https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.publish) method on the `Item` object to create the web layer.\n", "\n", - "Optionally, The `publish()` method accepts an optional `publish_parameters` dictionary where you can specify certain parameters. See the [publish REST API](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Publish_Item/02r300000080000000/) documentation for detailed descriptions on these parameters. For instance, the `address_fields` parameter allows you to specify which field in your csv or dataset contains address fields suitable for geocoding.\n", + "Optionally, The `publish()` method accepts an optional `publish_parameters` dictionary where you can specify certain parameters. See the [publish REST API](https://developers.arcgis.com/rest/users-groups-and-items/publish-item.htm) documentation for detailed descriptions on these parameters. For instance, the `address_fields` parameter allows you to specify which field in your csv or dataset contains address fields suitable for geocoding.\n", "\n", "Let us publish the csv into a web feature layer. This csv contains latitude and longitude coordinates of each point, hence the `address_fields` parameter can be ignored. The `publish()` method returns an `Item` object corresponding to the web layer created." ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 30, "metadata": {}, "outputs": [], "source": [ @@ -1523,7 +1571,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 31, "metadata": {}, "outputs": [ { @@ -1531,16 +1579,16 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Earthquakes around the world from 1800s to early 1900s\n", + " Earthquakes around the world from 1800s to early 1900s\n", " \n", - "
Feature Layer Collection by arcgis_python\n", - "
Last Modified: May 28, 2019\n", + "
Feature Layer Collection by arcgis_python\n", + "
Last Modified: October 12, 2023\n", "
0 comments, 0 views\n", "
\n", "
\n", @@ -1550,7 +1598,7 @@ "" ] }, - "execution_count": 20, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -1582,7 +1630,7 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -1680,7 +1728,7 @@ " 38.100000\n", " -122.266667\n", " MARE ISLAND\n", - " None\n", + " NaN\n", " -13610660\n", " 4593562\n", " \n", @@ -1693,7 +1741,7 @@ " 38.083333\n", " -122.250000\n", " SOUTH VALLEJO\n", - " None\n", + " NaN\n", " -13608810\n", " 4591205\n", " \n", @@ -1745,7 +1793,7 @@ " 43.400000\n", " -124.283333\n", " EMPIRE\n", - " None\n", + " NaN\n", " -13835160\n", " 5373055\n", " \n", @@ -1758,7 +1806,7 @@ " 43.366667\n", " -124.216667\n", " COOS BAY\n", - " None\n", + " NaN\n", " -13827740\n", " 5367950\n", " \n", @@ -1810,7 +1858,7 @@ " 45.516667\n", " -122.666667\n", " PORTLAND\n", - " None\n", + " NaN\n", " -13655190\n", " 5703230\n", " \n", @@ -1823,7 +1871,7 @@ " 21.950000\n", " -159.350000\n", " NAWILIWILI BAY\n", - " None\n", + " NaN\n", " -17738760\n", " 2505523\n", " \n", @@ -1836,7 +1884,7 @@ " 21.900000\n", " -159.583333\n", " PORT ALLEN\n", - " None\n", + " NaN\n", " -17764740\n", " 2499523\n", " \n", @@ -1862,7 +1910,7 @@ " 20.033333\n", " -155.833333\n", " KAWAIHAE\n", - " None\n", + " NaN\n", " -17347290\n", " 2276980\n", " \n", @@ -1888,7 +1936,7 @@ " 45.633333\n", " -122.683333\n", " VANCOUVER\n", - " None\n", + " NaN\n", " -13657050\n", " 5721784\n", " \n", @@ -1925,26 +1973,26 @@ "1 37.783333 -122.266667 ALAMEDA NGZ -13610660 4548863 \n", "2 37.816667 -122.333333 OAKLAND OAK -13618080 45535590 \n", "3 37.916667 -122.366667 POINT RICHMOND RIC -13621800 4567660 \n", - "4 38.100000 -122.266667 MARE ISLAND None -13610660 4593562 \n", - "5 38.083333 -122.250000 SOUTH VALLEJO None -13608810 4591205 \n", + "4 38.100000 -122.266667 MARE ISLAND NaN -13610660 4593562 \n", + "5 38.083333 -122.250000 SOUTH VALLEJO NaN -13608810 4591205 \n", "6 37.950000 -121.300000 STOCKTON SCK -13503050 4572365 \n", "7 38.583333 -121.500000 SACRAMENTO SMF -13525320 4662162 \n", "8 40.800000 -124.183333 EUREKA ACV -13824030 4982886 \n", - "9 43.400000 -124.283333 EMPIRE None -13835160 5373055 \n", - "10 43.366667 -124.216667 COOS BAY None -13827740 5367950 \n", + "9 43.400000 -124.283333 EMPIRE NaN -13835160 5373055 \n", + "10 43.366667 -124.216667 COOS BAY NaN -13827740 5367950 \n", "11 32.716667 -117.183333 SAN DIEGO SAN -13044790 3857756 \n", "12 33.766667 -118.183333 LONG BEACH LGH -13156110 3997514 \n", "13 36.616667 -121.883333 MONTEREY MRY -13567990 4385809 \n", - "14 45.516667 -122.666667 PORTLAND None -13655190 5703230 \n", - "15 21.950000 -159.350000 NAWILIWILI BAY None -17738760 2505523 \n", - "16 21.900000 -159.583333 PORT ALLEN None -17764740 2499523 \n", + "14 45.516667 -122.666667 PORTLAND NaN -13655190 5703230 \n", + "15 21.950000 -159.350000 NAWILIWILI BAY NaN -17738760 2505523 \n", + "16 21.900000 -159.583333 PORT ALLEN NaN -17764740 2499523 \n", "17 21.300000 -157.866667 HONOLULU HNL -17573640 2427687 \n", - "18 20.033333 -155.833333 KAWAIHAE None -17347290 2276980 \n", + "18 20.033333 -155.833333 KAWAIHAE NaN -17347290 2276980 \n", "19 19.733333 -155.066667 HILO ITO -17261940 2241467 \n", - "20 45.633333 -122.683333 VANCOUVER None -13657050 5721784 " + "20 45.633333 -122.683333 VANCOUVER NaN -13657050 5721784 " ] }, - "execution_count": 73, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -1957,7 +2005,7 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -1967,7 +2015,7 @@ "Name: latitude, dtype: float64" ] }, - "execution_count": 74, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -1980,7 +2028,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -2078,7 +2126,7 @@ " 21.950000\n", " -159.350000\n", " NAWILIWILI BAY\n", - " None\n", + " NaN\n", " -17738760\n", " 2505523\n", " \n", @@ -2091,7 +2139,7 @@ " 21.900000\n", " -159.583333\n", " PORT ALLEN\n", - " None\n", + " NaN\n", " -17764740\n", " 2499523\n", " \n", @@ -2117,7 +2165,7 @@ " 20.033333\n", " -155.833333\n", " KAWAIHAE\n", - " None\n", + " NaN\n", " -17347290\n", " 2276980\n", " \n", @@ -2155,14 +2203,14 @@ "11 32.716667 -117.183333 SAN DIEGO SAN -13044790 3857756 \n", "12 33.766667 -118.183333 LONG BEACH LGH -13156110 3997514 \n", "13 36.616667 -121.883333 MONTEREY MRY -13567990 4385809 \n", - "15 21.950000 -159.350000 NAWILIWILI BAY None -17738760 2505523 \n", - "16 21.900000 -159.583333 PORT ALLEN None -17764740 2499523 \n", + "15 21.950000 -159.350000 NAWILIWILI BAY NaN -17738760 2505523 \n", + "16 21.900000 -159.583333 PORT ALLEN NaN -17764740 2499523 \n", "17 21.300000 -157.866667 HONOLULU HNL -17573640 2427687 \n", - "18 20.033333 -155.833333 KAWAIHAE None -17347290 2276980 \n", + "18 20.033333 -155.833333 KAWAIHAE NaN -17347290 2276980 \n", "19 19.733333 -155.066667 HILO ITO -17261940 2241467 " ] }, - "execution_count": 75, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -2182,7 +2230,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -2191,7 +2239,7 @@ "" ] }, - "execution_count": 76, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -2210,7 +2258,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -2219,9 +2267,26 @@ "ports_json = json.dumps({\"featureCollection\": {\"layers\": [ports_fc_dict]}})" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We are going to create an item titled \"Ports to the south of SFO along west coast of USA\", but first let's see if there is any item already created with the same title by the current user, if it is then we'll delete it so that there are no duplicate items" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "for ports_item in gis.content.search(query=\"title:Ports to the south of SFO along west coast of USA AND owner:\"+username):\n", + " ports_item.delete()" + ] + }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -2229,16 +2294,16 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " Ports to the south of SFO along west coast of USA\n", + " Ports to the south of SFO along west coast of USA\n", " \n", - "
Feature Collection by arcgis_python\n", - "
Last Modified: May 28, 2019\n", + "
Feature Collection by arcgis_python\n", + "
Last Modified: October 16, 2023\n", "
0 comments, 0 views\n", "
\n", "
\n", @@ -2248,7 +2313,7 @@ "" ] }, - "execution_count": 78, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -2289,16 +2354,16 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "False" + "True" ] }, - "execution_count": 79, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -2310,7 +2375,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 36, "metadata": {}, "outputs": [ { @@ -2318,16 +2383,16 @@ "text/html": [ "
\n", " \n", "\n", "
\n", - " awesome_python\n", + " awesome_python\n", " \n", - "
Feature Layer Collection by arcgis_python\n", - "
Last Modified: May 28, 2019\n", + "
Feature Layer Collection by arcgis_python\n", + "
Last Modified: October 16, 2023\n", "
0 comments, 0 views\n", "
\n", "
\n", @@ -2337,7 +2402,7 @@ "" ] }, - "execution_count": 81, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -2350,7 +2415,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 37, "metadata": {}, "outputs": [ { @@ -2359,7 +2424,7 @@ "[]" ] }, - "execution_count": 82, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -2398,18 +2463,26 @@ }, { "cell_type": "code", - "execution_count": 84, + "execution_count": 38, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\tar12555\\AppData\\Local\\ESRI\\conda\\envs\\pyapi-dev\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3553: DeprecatedWarning: create_folder is deprecated as of 2.3.0 and has be removed in 3.0.0. Use `gis.content.folders.create` instead.\n", + " exec(code_obj, self.user_global_ns, self.user_ns)\n" + ] + }, { "data": { "text/plain": [ "{'username': 'arcgis_python',\n", - " 'id': '582477ad46d44b32bd9c175293ba31de',\n", + " 'id': 'a2e4bca479bb4c1da0c5160f8c596e2b',\n", " 'title': 'ports'}" ] }, - "execution_count": 84, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } @@ -2421,19 +2494,19 @@ }, { "cell_type": "code", - "execution_count": 85, + "execution_count": 39, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'success': True,\n", - " 'itemId': '5d9fce7221444c52a35670497719b102',\n", + " 'itemId': '5f85dc7bb8eb44d6b29fc142aa830ccd',\n", " 'owner': 'arcgis_python',\n", - " 'folder': '582477ad46d44b32bd9c175293ba31de'}" + " 'folder': 'a2e4bca479bb4c1da0c5160f8c596e2b'}" ] }, - "execution_count": 85, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -2452,19 +2525,19 @@ }, { "cell_type": "code", - "execution_count": 86, + "execution_count": 40, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'success': True,\n", - " 'itemId': '5d9fce7221444c52a35670497719b102',\n", + " 'itemId': '5f85dc7bb8eb44d6b29fc142aa830ccd',\n", " 'owner': 'arcgis_python',\n", - " 'folder': None}" + " 'folder': 'null'}" ] }, - "execution_count": 86, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -2474,6 +2547,34 @@ "ports_item.move(folder='/')" ] }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\tar12555\\AppData\\Local\\ESRI\\conda\\envs\\pyapi-dev\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3553: DeprecatedWarning: delete_folder is deprecated as of 2.3.0 and has be removed in 3.0.0. Use `Folder.delete()` instead.\n", + " exec(code_obj, self.user_global_ns, self.user_ns)\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "gis.content.delete_folder(folder='ports')" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -2500,7 +2601,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.11" + "version": "3.9.16" }, "toc": { "base_numbering": 1,