Skip to content

Commit 8e2ad2c

Browse files
committed
requested changes
1 parent 03d473f commit 8e2ad2c

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

samples/04_gis_analysts_data_scientists/which_counties_and_states_have_access_to_airports.ipynb

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@
676676
"cell_type": "markdown",
677677
"metadata": {},
678678
"source": [
679-
"## __2. Which counties are underserved by access to airports, despite average or greater population density?__\n"
679+
"### __2. Which counties are underserved by access to airports, despite average or greater population density?__\n"
680680
]
681681
},
682682
{
@@ -685,7 +685,7 @@
685685
"source": [
686686
"This leads us to find which of these missing counties do not have access to airports despite average or greater population density? \n",
687687
"\n",
688-
"For this we use the `enrich_layer` analysis method to enrich the counties with data for population for each of these counties from the most recent year (2025) using the `TOTPOP_CY` variable."
688+
"For this we use the `enrich_layer` analysis method to enrich the counties with population data from the most recent year (2025) using the TOTPOP_CY variable.\n"
689689
]
690690
},
691691
{
@@ -704,6 +704,27 @@
704704
"from arcgis.features.analysis import enrich_layer"
705705
]
706706
},
707+
{
708+
"cell_type": "markdown",
709+
"metadata": {},
710+
"source": [
711+
"Before we enrich our existing counties layer, let's delete any existing layer having the same title and then generate a layer with updated data."
712+
]
713+
},
714+
{
715+
"cell_type": "code",
716+
"execution_count": 43,
717+
"metadata": {},
718+
"outputs": [],
719+
"source": [
720+
"title = 'enriched_counties_2025'\n",
721+
"\n",
722+
"existing_enriched_item = gis.content.search(query='title:'+title)[0]\n",
723+
"# delete it if it exists\n",
724+
"if existing_enriched_item:\n",
725+
" existing_enriched_item.delete()"
726+
]
727+
},
707728
{
708729
"cell_type": "code",
709730
"execution_count": 15,
@@ -739,7 +760,7 @@
739760
}
740761
],
741762
"source": [
742-
"enriched_counties = enrich_layer(counties_layer, analysis_variables=['TOTPOP_CY'], output_name='enriched_counties_2025')\n",
763+
"enriched_counties = enrich_layer(counties_layer, analysis_variables=['TOTPOP_CY'], output_name=title)\n",
743764
"enriched_counties"
744765
]
745766
},

0 commit comments

Comments
 (0)