ArcGIS Developers

ArcGIS API for Python

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.

Image of an AED device attached to a wall at San Diego Convention Center during Esri UC

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

In [2]:
from arcgis.gis import GIS
from arcgis.mapping import WebMap
from arcgis.widgets import MapView
from arcgis.features import FeatureCollection, use_proximity
from datetime import datetime
In [3]:
gis = GIS(url='', username='arcgis_python', password='amazing_arcgis_123')

Load input datasets

In [5]:
ohca_item = gis.content.get('a5719916dff4442789a59680c25a4284')
Pittsburgh heart attacks
OHCA in PittsburghFeature Layer Collection by api_data_owner
Last Modified: June 21, 2018
0 comments, 102 views
In [8]:
ohca_map_item = gis.content.get('b8b6cf2bcbeb4903a5372b7f4cbfb252')
Pittsburgh heart attacks
Map showing cardiac arrest information in PittsburghWeb Map by api_data_owner
Last Modified: March 11, 2020
0 comments, 44 views

Let us take a look at the layers available in this item

In [9]:
for lyr in ohca_item.layers:
Heart attack incidence

Let us display the Web Map item to view these layers on a map.

In [38]:
map1 = MapView(item=ohca_map_item)