Finding suitable spots for placing heart defibrillator equipments in public¶
In this sample, we will observe how site suitability analyses can be performed using the ArcGIS API for Python. The objective of this sample is to find locations in the city of Philadelphia that are suitable for placing AED (Automated External Defibrillator) for public emergencies.
The criteria for suitable places are those that have high incidence of OHCA (Out of Hospital Cardiac Arrests) and be accessible to public, such as commercial areas.
As inputs, we start with geocoded OCHA (Out-of-Hospital Cardiac Arrest) point data, along with a few base layers for the city of Pittsburgh published as feature layers. As output, we need to generate a list of locations that have a high incidence of heart-attacks and located within commercial areas, allowing easy access at times of emergencies.
Getting set up¶
from arcgis.gis import GIS
from arcgis.mapping import WebMap
from arcgis.widgets import MapView
from arcgis.features import FeatureCollection, use_proximity_proximity
from datetime import datetime
gis = GIS(url='https://pythonapi.playground.esri.com/portal', username='arcgis_python', password='amazing_arcgis_123')
Load input datasets¶
ohca_item = gis.content.search(query="title:pitts* & owner: api_data_owner", item_type='Feature Layer')[0]
ohca_map_item = gis.content.search(query="title:pitts* & owner: api_data_owner", item_type='Web Map')[0]
ohca_item
Let us take a look at the layers available in this item
for lyr in ohca_item.layers:
print(lyr.properties.name)
Let us display the Web Map item to view these layers on a map.
map1 = MapView(item=ohca_map_item)
map1.legend=True
map1