Is it possible to create a crime heat map without latitude or longitude? I have the name of the buildings were the incidences have taken place.

775
5
12-06-2018 11:50 AM
MeghanWong
New Contributor

I have been tasked to create a crime heat map, however, the data that I have been provided does not list the latitude or longitude. The only information I have is the name of the building where the incidence has taken place.

So my question is, is it still possible to create a crime heat map given these circumstances?

0 Kudos
5 Replies
MohyudinAhmad
New Contributor II

Hi Meghan,

You could geocode the building by their names or addresses, thus being able to get the coordinates for them. Once you have geocoded all your buildings, you will be able to symbolize the layer using the heat map symbology.


Depending on whether you have access to a batch geocoder, you may be able to batch geocode (all the addresses at once), but if you are leveraging the esri world geocoder, you will have to geocode one address at a time. 

What are you using to interact with the platform? Portal (Enterprise), ArcGIS Online, ...?

For more information, please see the following links.

Geocoding in ArcMap - Geocoding a table of addresses in ArcMap—Help | ArcGIS Desktop 
More in for on Geocoding - Geocoding and Place Search | ArcGIS for Developers & Geocoding | Geosearch, Reverse & Batch Geocoding 

Regards,

Umar

0 Kudos
MeghanWong
New Contributor

Hi Umar,

Thank you for your help, I'm new to ArcGIS (which I'm using to interact with the platform).  I work at a post-secondary school where there is one address for the entire university.  There aren't specific addresses for the buildings that are to be included in the heat map.  Is it still possible to geocode the building names?

Thank you,

Meghan

0 Kudos
MohyudinAhmad
New Contributor II

Hi Meghan,

No worries, if your buildings do not have unique addresses, you may also be able to get the coordinates by simply getting the coordinates off the map, using a satellite basemap (provided by ArcGIS Online) to identify the buildings from a birds eye view. It seems a little old school, but this is another method by which you can get the lat/long for the building. Use the measure tool to gather the coordinates, instructions here: Measure—ArcGIS Online Help | ArcGIS .

How many buildings are you interacting with? If there are a small number, the above mentioned method is probably fastest.

Though you may already have tried, could you confirm that you are not able to find any of your campus buildings through the geocoding tool in ArcGIS Online?

Regards,

Umar

0 Kudos
MeghanWong
New Contributor

Hi Umar,

I'm interacting with approximately 50 buildings.

I have not been able to find any of my campus buildings through the ArcGIS geocoding tool.  I'm able to find the university when I add the university's address, but not able to find the other buildings.  

Best,

Meghan

0 Kudos
ChelseaRozek
MVP Regular Contributor

Hi Meghan,

     If you have access to ArcMap and the building names are standardized in your list, I wrote some Python that you could use to update the Latitude and Longitude of your features. You would need to fill out the bldglocation dictionary with the proper values for each building, which would be a one time pain. I would use Google Maps and right click>What's Here? to get the latitude and longitude of each building. I ran this on a table in a geodatabase, I'm not sure what format your crime data is in. I brought the table into ArcMap, right clicked>Display XY Data in WKID 4326 so it would display the features as points once they got lat/long. On my crime table, I had fields of LATITUDE, LONGITUDE, and BUILDINGNAME, so you would need to replace those with yours. Let me know if you have any questions or if this doesn't work with your situation.

crimetable = r'C:\Users\me\Desktop\crimes.gdb\CrimesOriginal'
bldglocation =    {
  "White House": "38.897693, -77.036583",
  "Statue of Liberty": "40.689323, -74.044567"
}
fields = ['LATITUDE', 'LONGITUDE', 'BUILDINGNAME']
#-------------0----------1-------------2
with arcpy.da.UpdateCursor(crimetable,fields,"LATITUDE IS NULL AND LONGITUDE IS NULL") as cursor:
    for row in cursor:
        row[0] = bldglocation[row[2]].split(", ")[0]
        row[1] = bldglocation[row[2]].split(", ")[1]
        cursor.updateRow(row)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos