Deploy the solution

First, you'll assume the role of a crime analyst preparing for a monthly CompStat meeting. CompStat offers a dynamic approach to crime reduction, quality of life improvement, and personnel and resource management, allowing police department executives to identify spikes in crimes using comparative statistics and to address those spikes using targeted enforcement.

Your job is to prepare a briefing on the year-to-date (YTD) robberies committed per police precinct. In addition, you'll do the following:

  • Calculate the YTD percentage of change in robbery occurrences per police precinct.
  • Determine the 28-day percentage of change per police precinct.
  • Generate a kernel density hot spot for last 28 days.
  • Create a density map showing change from the previous 28 days.

These products go into a story map briefing to prepare division captains and are also used for the main meeting. To help you perform these tasks, you'll use the Crime Analysis solution. ArcGIS Solutions are industry-specific app and capability configurations available to ArcGIS users. The Crime Analysis solution organizes existing geoprocessing tools used in crime analysis workflows and provides several new tools that support data management, tactical and strategic analysis, investigative analysis, and information sharing needs.

Deploy the Crime Analysis solution

First, you'll deploy the Crime Analysis solution to your ArcGIS organization. If you've never used ArcGIS Solutions before, you'll need to install the Add-In. After you install the add-in, all available ArcGIS Solutions will be accessible on the Share tab.

  1. Start ArcGIS Pro. If prompted, sign in using your licensed ArcGIS account.
    Note:

    If you don't have ArcGIS Pro, you can sign up for an ArcGIS free trial.

    Tip:

    In ArcGIS Pro, you can personalize the appearance of the user interface with either a light or a dark theme. In these lessons, the example images will use the dark theme, but you can use the theme that you prefer. If you want to change the theme, click Options. In the Options window, under Application, click General. Expand Application Theme and choose Dark. You'll need to restart ArcGIS Pro for your theme changes to take effect.

  2. From New - Blank Templates, click Map.
  3. In the Create a New Project window, change Name to Deploy Solutions and click OK.

    The project opens with a blank map.

  4. On the ribbon, click the Share tab. In the Deploy group, click ArcGIS Solutions.

    ArcGIS Solutions button

    If you haven't installed the ArcGIS Solutions Add-In, you'll need to download and install it before you proceed. The ArcGIS Solutions Deployment Tool opens in the Tasks pane. Tasks are sets of preconfigured steps that guide you through a workflow. The first task is to sign in to your organization. If the ArcGIS Solutions tool does not appear on the Share ribbon after installation, restart ArcGIS Pro.

  5. In the Tasks pane, double-click the Sign in to ArcGIS organization task.

    Sign in to an ArcGIS organization

    Solutions require access to an ArcGIS Online or ArcGIS Enterprise organization with content creation privileges. If you signed in when you started ArcGIS Pro, you won't need to sign in again.

  6. If you're not already signed in, sign in to your organizational account.
  7. In the Tasks pane, click Finish.
  8. Double-click the Deploy an ArcGIS Solution task.
  9. In the search bar, type crime and click Enter.
  10. In the list of search results, select Crime Analysis and click Deploy.

    Locate the Crime Analyst solution

    The solution deploys.

  11. Once deployment is complete, click the green check mark.

    A browser tab or window opens and shows the details of the Crime Analysis desktop application template. This item was created when you deployed the solution. It contains an ArcGIS Pro package with sample data and the Crime Analysis add-in. You'll download the desktop application template and install the add-in.

  12. In the details page, click Download.

    Download Crime Analysis solution

  13. Extract the contents of the downloaded file to a new folder named Crime Analysis.

    Next, you'll install the Crime Analysis add-in.

  14. Close ArcGIS Pro.
  15. In your Crime Analysis folder, double-click CrimeAnalysis.esriAddInX.
  16. Click Install Add-In.

    Once installed, the Crime Analysis tab is added to the ArcGIS Pro ribbon.

You've installed the ArcGIS Solutions add-in. You also deployed the Crime Analyst solution, which you downloaded and installed in ArcGIS Pro.


Prepare the data

Previously, you installed the Crime Analysis add-in. You also downloaded an ArcGIS Pro project. Next, you'll open the project, familiarize yourself with the data, and prepare the data for analysis.

Review the tools and data

First, you'll become familiar with the tools and data available after you installed the Crime Analysis add-in.

  1. Browse to your Crime Analysis folder.
  2. Double-click CrimeAnalysis.ppkx.

    The Crime Analysis project opens in ArcGIS Pro. It displays a map titled Input Data, which contains fictitious crime data. The ribbon now includes a Crime Analysis tab. You'll use several tools included on this tab to analyze crime data in preparation for your CompStat briefing.

  3. On the ribbon, click the Crime Analysis tab.

    The tab contains five groups of tools:

    • The Data Management group contains tools to import, clean, enhance, and enrich data.
    • The Selection group contains various selection tools that include a Selection By Date and Time tool.
    • The Tactical and Strategic Analysis group contains tools for analysis of crime incidences, density, and the creation of hot spots and space-time relationships.
    • The Investigative Analysis group contains tools to aid investigators in exploring the relationship between incidents, suspects, locations, and time.
    • The Create and Share Information group contains tools to share analysis results as information products.

    Next, you'll review the data included with the project.

  4. On the View tab, in the Windows group, click Catalog Pane.
  5. In the Catalog pane, expand Databases, crimeanalysis.gdb, and InputData.

    The geodatabase contains two feature datasets: InputData, which contains feature classes that may be populated with data that can be used as inputs for crime analysis tools, and ToolOutputs, used to contain feature classes that result from analysis.

    Crime analysis geodatabase

  6. Collapse Databases. Expand Maps.

    Crime analysis sample maps

    The project includes several example maps illustrating results generated by various crime analysis tools. Open and examine several of the maps. Most of these maps contain an example and the results of the tool the map is named after (for instance, 80-20 Analysis contains the results of using the 80-20 Analysis tool). The Input Data map contains sample data that can be used as input layers in each Crime Analysis tool to produce a set of output layers.

    • Enhance Attributes illustrates the use of the Extract Data Parts to Field and Append Attributes to Polygon tools.
    • 80-20 Analysis illustrates using calls for service as input data for 80-20 Analysis.
    • Incident Count illustrates using the Incident Count tool to sum the number of arrests within each police precinct.
    • Percentage Change and Select by Date and Time illustrates using the Select by Date and Time tool to select violent crimes in the second and third quarters, and then comparing changes in these time periods within each precinct.
    • Density Change & Select by Date and Time illustrates selecting service calls occurring during daytime and nighttime hours, and then creating a density raster for each.
    • Incident Sequence illustrates motor vehicle thefts over a six-month time frame using the Incident Sequence tool.
    • Incident Path (MV Theft to Recovery) illustrates motor vehicle recovery using the Incident Path tool with motor vehicle theft data.
    • Incident Path (Gang Turf to Member Homes) illustrates gang turf to member homes using the Incident Path tool.
  7. Collapse Maps.

Set up for analysis

Next, you'll start preparing your map and data. First, you'll create a new map with a basemap that will look appealing and add relevant contextual information to your crime data. A dark basemap that includes basic information about human geography, such as where buildings and roads are located, should complement crime data well. The Human Geography Dark Basemap isn't among the predefined gallery of basemaps in ArcGIS Pro, but you can add it from the ArcGIS Living Atlas of the World, an online data repository.

  1. In the Catalog pane, click Portal.
  2. Click the Living Atlas button.
  3. In the search box, type human geography.
  4. In the search results, right-click Human Geography Dark Map and choose Add and Open.

    Add a basemap

    A new map named Human Geography Dark Basemap is created. The map contains three layers, one for labels, one for details (such as country boundaries and buildings), and one for the basic shape of continents and other major physical features. You can turn these layers on and off or move them above or below other layers for emphasis.

    Because your goal is to create a story map for use in the CompStat meeting, you'll use this map to publish your data online. It'll include the final analysis layers that you want to show in the story map. You'll change the map properties to better suit your intended use for the map.

  5. In the Contents pane, double-click Human Geography Dark Basemap.

    The Map Properties window appears.

  6. On the General tab, for Name, type Publishing.

    You'll also change the coordinate system to a Mercator projection, the kind of projection system used by online maps.

  7. Click the Coordinate System tab and search for WGS 1984 Web Mercator Auxiliary Sphere.
  8. In the list of results, update the projection to WGS 1984 Web Mercator Auxiliary Sphere. Click OK.

    The projection changes. The map may look different than it did before.

Locate and add data

Next, you'll add the data you want to analyze to your map. First, you'll copy the Police Precincts layer from the Input Data map.

  1. Above the map view, click Input Data.

    The Input Data map becomes active.

  2. In the Contents pane, right-click Police Precincts and choose Copy.
  3. Return to the Publishing Map. In the Contents pane, right-click Publishing and choose Paste.

    Next, you'll add robbery data. Before you add it, it's a good idea to save.

  4. Close the Input Data map. You will not be using it again.
  5. On the Quick Access Toolbar, click Save.
  6. Download Robberies.zip. Extract the file to your Crime Analysis folder.

    The file contains a Robberies layer file as well as a Robberies.csv file. The files contain fictitious data about robberies that occurred in 2017 and 2018. To access the data, you'll create a folder connection to it.

  7. In the Catalog pane, click the Project tab. Right-click Folders and choose Add Folder Connection. Browse to and double-click the Crime Analysis folder.

    A folder connection is added. You can now access the data in the folder in ArcGIS Pro.

  8. From the Crime Analysis folder connection, add the Robberies.lpkx file to the Publishing map.

    The layer includes the feature class that will be used to import the robbery data from the CSV file.

  9. Add the Robberies.csv file to the Publishing map.

    The file is added as a stand-alone table. You'll open the table and explore its data.

  10. In the Contents pane, right-click Robberies.csv and choose Open.

    The table contains several attributes necessary for conducting crime analysis:

    • Unique identifier for each crime
    • Date of crime
    • Address, city, state, and ZIP Code for geocoding
    • Type of crime

    Robberies attribute table

Configure and import robbery data

The table entries have spatial data in the form of addresses, but they haven't yet been mapped. To map and analyze robbery data, you could use the data structure of the CSV file, or you could add your own fields as needed. You'll set up a configuration file to facilitate importing and mapping the robbery data in the table for use with the crime analysis tools.

The Setup Import tools create configuration files that are used to define parameters of input source data and the resultant output feature class. The configuration file created by the Setup Import tools can be reused to import new records anytime the source file is updated. The configuration file can also be used in a Python script to automate the import process using Windows Task Scheduler.

  1. On the ribbon, click the Crime Analysis tab. In the Data Management group, click Setup Import and choose From Address Table.

    Setup Import From Address Table option

    The Configure Record Import (Addresses) tool opens. It requires several parameters.

  2. Adjust the following parameters:
    • For Configuration Filename, type robberies.ini (for the file location, specify the Crime Analysis folder).
    • For Source Table, choose Robberies.csv.
    • For Target Features, type Robberies.
    • For Log File Directory, choose the Crime Analysis folder.
    • For Summary Field, choose municipality.
    • For Record Identifier Field, choose offenseid.
    • For Record Date Field, choose offendate.
    • For Street Address Field, choose fulladdr.
    • For City Field, choose municipality.
    • For State Field, choose State.
    • For ZIP Field, choose Zip5.
    • For Address Locator, choose ArcGIS World Geocoding Service.
    • For Schema Mapping Type, choose Use Field Mapping.

    Configuration Record Import parameters

  3. For Field Matching, adjust parameters based on the following table:

    Source FieldTarget Field

    municipality (String)

    municipality (String)

    offenseid (String)

    offenseid (String)

    offendate (Date)

    offendate (Date)

    fulladdr (String)

    fulladdr (String)

    State (String)

    State (String)

    zip5 (Integer)

    zip5 (String)

    ucrcode (Integer)

    ucrcode (String)

    ucrdesc (String)

    ucrdesc (String)

    casestatus (String)

    casestatus (String)

    Field Matching choices
    Note:

    In this example, the field name and properties for the source and the target are the same, except for the ucrcode and zip5 fields. If names and properties are different, you use Field Mapping to match source to target fields.

  4. For Timestamp Format, choose 01-18-16 14:53 and click Run.

    The Robberies.ini configuration file is created. You'll use it to import records from the robberies.csv table to a robbery feature class located in the Input Data map.

  5. On the ribbon, in the Data Management group, click Import Records.

    Import Records

    The Import Records tool opens.

  6. For Configuration file, browse to and choose the robberies.ini configuration file.

    Import Records parameters

  7. Click Run.

    The tool geocodes robbery locations and adds the results to the Robberies layer. In addition, the tool creates several log files, containing details of the record import and geocoding processes.

  8. In the Contents pane, right-click Police Precincts and choose Zoom to Layer.

    You can now visualize the location of robberies on the map.

Enhance analysis attributes

In preparation for the CompStat meeting, you want to identify which crimes occurred on certain days of the week or at certain times of the day. To do so, you'll parse the original Date attribute into several date- and time-specific fields.

  1. On the ribbon, on the Crime Analysis tab, in the Data Management group, click Enhance Attributes and choose Extract Date Parts to Field.

    Extract Date Parts to Field option

    The Extract Date Parts to Field tool parses or splits a date field into multiple fields with more granularity. You'll then be able to identify patterns of occurrence by day of the week or time of day.

  2. Adjust the following parameters:
    • For Target Features, choose Robberies.
    • For Date Field, choose offendate.
    • Check Weekday.
    • Check Hour.

    Extract Date Parts to Field parameters

  3. Click Run.

    The Robberies layer is updated with fields named offendate_Weekday and offendate_Hour.

    In addition to the day of the week and time of day, you want to identify the precinct or district in which each crime occurred. The Append Attributes From Polygon tool can be used to derive the precinct number from the District ID field in the Police Precincts layer.

  4. On the ribbon, in the Data Management group, click Enhance Attributes and choose Append Attributes from Polygon.
  5. Adjust the following parameters:
    • For Input Polygon Features, choose Police Precincts.
    • For Target Point Features, choose Robberies.
    • For Fields to Append, choose District ID.

    Append Attributes from Polygon parameters

  6. Click Run.

    The Robberies layer is updated with the District ID field.

  7. In the Contents pane, right-click Robberies and choose Attribute Table.

    The three new fields are added to the end of the table.

    Updated and new fields

    The offendate_Weekday field contains the day of the week on which the robbery occurred, while the offendate_Hour field contains the hour. The districtid field contains the precinct where the robbery occurred.

  8. Close the table and save the project.

You've imported robbery data from a CSV file and updated several fields for use in analysis.


Analyze crime statistics

Previously, you prepared your data. Next, you'll query and analyze the robbery data in preparation for the CompStat meeting. In particular, you'll determine the number of robberies in each precinct, the percentage change in robberies in each precinct, and the density and density change of robberies. You'll conduct analysis for four different time periods: the year to date (YTD), the previous YTD, the current 28 days, and the previous interval of 28 days.

The goal of your analysis is to determine the following:

  • Total number of robberies in each precinct
  • Percent change in each precinct for 28 days and previous 28 days
  • Percent change in each precinct for YTD and previous YTD
  • Density of robberies for current 28 days and previous 28 days
  • Density of robberies for current YTD and previous YTD
  • Density change of robberies within 28-day and YTD time periods

Create layers based on time

To analyze robberies based on when they were committed, you'll create new layers that contain only robberies that occurred in a certain time period. You'll select robbery features from the existing layer that fit the proper date criteria and export them as new layers.

For the purposes of this exercise, you'll assume the current date is June 30, 2018. Thus, the YTD time interval is January 1, 2018, to June 30, 2018, and the previous YTD is the same interval but in 2017. You'll create a layer for the previous YTD first.

  1. If necessary, open your project.
  2. On the ribbon, click the Crime Analysis tab. In the Selection group, click Select By Date and Time.

    Select By Date and Time

    The Select By Date and Time tool opens.

  3. Adjust the following parameters:
    • For Input Features, choose Robberies.
    • For Selection type, choose New selection.
    • For Date Field, choose offendate.
    • Check Select by Date.
    • Expand Select by Date (Options).
    • For Date Selection Type, choose By Date Range.
    • For Start Date, specify 1/1/2017.
    • For End Date, specify 6/30/2017.

    Select robberies by date

  4. Click Run.

    322 robberies committed between January 1, 2017, and June 30, 2017, are selected. Next, you'll export the selected robberies to a new layer.

  5. In the Contents pane, right-click Robberies, point to Data, and choose Export Features.

    The Copy Features tool opens.

  6. For Input Features, choose Robberies. For Output Feature Class, type Robberies_PreviousYTD.
  7. Click Run.

    A layer named Robberies_PreviousYTD is added to the map. Next, you'll create three additional layers for the three remaining time intervals of interest.

  8. On the Crime Analysis tab, in the Selection group, click Clear.

    The current selection is cleared.

  9. Open Select By Date and Time. Run the tool with the same parameters as before, but change Start Date and End Date to the ranges below. After each selection, use the Copy Features tool to create a new output feature class, then clear the selection.
    • Start Date: 1/1/2018, End Date: 6/30/2018, Output Feature Class: Robberies_YTD
    • Start Date: 6/1/2017, End Date: 6/28/2017, Output Feature Class: Robberies_Last28Days
    • Start Date: 5/3/2018, End Date: 5/31/2018, Output Feature Class: Robberies_Previous28Days

    You now have the following four layers in the Contents pane:

    • Robberies_PreviousYTD
    • Robberies_YTD
    • Robberies_Last28Days
    • Robberies_Previous28Days
  10. Clear the selection.

Symbolize robberies by date

It will be useful to distinguish between robberies committed in the last and previous 28 days as well as those committed in the current and previous year to date. Next, you'll symbolize the data so each time period of robberies can be distinguished.

  1. If necessary, in the Contents pane, expand Robberies_Last28Days and click the symbol below it.

    The Symbology pane appears. These new layers will be used in the next step to determine the number of robberies within each precinct. The Robberies_PreviousYTD and Robberies_YTD layers will be compared to determine the percent changes of robberies within each precinct. The same comparison will be made of the Robberies_Previous28Days to Robberies_Last28Days layers. The results of this comparison will be used in the CompStat meeting story map.

  2. In the Symbology pane, click the Gallery tab and choose Circle 3. Update the symbol outline to a light red.

    The symbol on the map changes to show the red circle with a light red outline.

  3. In the Contents pane, click the symbol for Robberies_Previous28Days. In the Symbology pane, on the Gallery tab, change the symbol to Circle 3.
  4. Click the Properties tab and expand Appearance, and then click the Color menu. Choose a bright orange color, such as Seville Orange, and click Apply. Update the symbol outline to light orange.

    Tip:
    To see the name of each color, hover over it.

  5. Repeat the process to change the symbol for Robberies_YTD to a yellow circle (such as Solar Yellow) and Robberies_PreviousYTD to a gray circle (such as Gray 20%). Click Apply after each change. In addition, modify the symbol outlines to dark yellow and dark gray.

    Selection layers symbolized

    The layers showing robberies at different time periods are now symbolized with a color scheme, with red representing the most current and gray the oldest.

Determine robberies per precinct

Next, you'll calculate the number of robberies that occurred in each precinct for the YTD.

  1. In the Contents pane, uncheck all layers except Police Precincts and the three basemap layers.
  2. On the ribbon, click the Crime Analysis tab. In the Tactical and Strategic Analysis group, click Incident Count.

    Incident Count button

    The Incident Count tool opens.

  3. In the Incident Count tool, adjust the following parameters:
    • For Polygon or Line Target Features, choose Police Precincts.
    • For Point Join Features, choose Robberies_YTD.
    • For Output Feature Class, accept the default name, Police_Precincts_IncidentCount.
    • For Category Field, choose Case Status.
    Incident Count parameters
  4. Click Run.

    The new layer, named Police_Precincts_IncidentCount, is added. The color ramp displays the number of robbery incidents occurring within each precinct. Precincts with darker reds and browns have a higher number of robberies.

    Each precinct is labeled with the Incident Count value. Next you'll update the label to include the Precinct id as well as the incident count.

  5. Right Click on the Police_Precincts_IncidentCount layer, and select Labeling Properties.
  6. In the Label Class pane create the following expression "Precinct " + $feature.Precincts_districtid + TextFormatting.NewLine + "Incident Count: " + $feature.Join_Count

    To create the expression:

    • Type "Precinct " +
    • From Fields, choose District ID
    • Type + TextFormatting.Newline +
    • Type "Incident Count: " +
    • From Fields, choose Join_Count
    Create label expression

  7. Click Apply and Close the Label Class pane.

    Labeling updates and each precinct is now labeled with the precinct name or number and on a new line, the number of robbery incidents.

    Incidents per precinct

Compute percent change in robberies

Next, you'll find out whether robberies have increased or decreased within each precinct in the past 28 days compared to the previous 28 days.

  1. On the Crime Analysis tab, in the Tactical and Strategic Analysis group, click Percent Change.

    Percent Change tool

    The Percent Change tool opens.

  2. Adjust the following parameters:
    • For Input Current Period Point Features, choose Robberies_Last28Days.
    • For Input Previous Period Point Features, choose Robberies_Previous28Days.
    • For Input Comparison Polygon or Line Features, choose Police Precincts.
    • For Output Feature Class, accept the default name, Robberies_Last28Days_PercentChange.

    Percent Change parameters

  3. Click Run.

    A new layer named Robberies_Last28Days_PercentChange is added. It displays the percent change in robberies within each precinct between the previous and current 28 days.

    Note:

    The default symbology is random and yours may differ from the example images.

    Percent change in robberies for the last 28 days

    The percent changes are symbolized using a graduated color ramp. In the example image, darker blues represent the largest decreases in robberies, while darker reds represent the largest increases. Each precinct is labeled with the percent increase or decrease. The label also includes the number of robberies in the last 28 days followed by the number of robberies in the previous 28-day period. Precincts 6 and 8 and Downtown experienced notable increases in robberies.

    You'll run the tool again to determine the percent change between the current YTD and the previous YTD.

  4. If necessary, reopen the Percent Change tool.
  5. Adjust the following parameters:
    • For Input Current Period Point Features, choose Robberies_YTD.
    • For Input Previous Period Point Features, choose Robberies_PreviousYTD.
    • For Input Comparison Polygon or Line Features, choose Police Precincts.
    • For Output Feature Class, accept the default name Robberies_YTD_PercentChange.

    Percent Change YTD tool

  6. Click Run.

    Percent Change YTD Map

    A new layer named Robberies_YTD_PercentChange is added. It displays the percent change in robberies within each precinct for the year to date. As before, the default colors are random. In the example image, blue precincts are where robberies decreased, while reds are where robberies increased. The largest increases in robberies occurred in precincts 3, 5, 6, 7, and 8 and Downtown.

    Note:

    The percent changes are symbolized using a graduated color ramp where the darker blues represent the largest decreases in robberies, while the darker reds represent the largest increases. Each precinct is labeled with the percent increase or decrease. The label also includes the number of robberies for the year to date, followed by the number of robberies in the previous year to date. When you investigate the map, you can see the largest increases in robberies for the year to date are in precincts 6 and 8 and the Downtown precinct. This is also consistent with the 28-day percent change map, so you can see a growing trend in these areas that will need to be addressed.

Determine the density of robberies

Where are robberies most concentrated? To answer this question, you'll calculate hot spots for all four time intervals of interest.

  1. On the Crime Analysis tab, in the Tactical and Strategic Analysis group, click Density Analysis and choose Kernel Density.

    Kernel Density tool

    The Kernel Density tool opens.

  2. Adjust the following parameters:
    • For Input point or polyline features, choose Robberies_Last28Days.
    • For Population field, choose None.
    • For Output raster, type Robberies_Last28Days_Density.
    • For Output cell size, type 140.
    • Accept the defaults for Search radius, Area units, Output cell values, and Method.
    • Click the Environments tab and change Mask to Police Precincts.

    Kernel Density parameters

  3. Click Run.

    A new raster layer named Robberies_Last28Days_Density is added. It shows the magnitude of robberies across the entire jurisdiction. The mask limited the layer to the boundary of the precincts. The layer is symbolized with a multipart color scheme. You'll adjust the symbology to emphasize dense clusters of crime with red colors.

  4. In the Contents pane, right-click Robberies_Last28Days_Density and choose Symbology.
  5. In the Symbology pane, expand the Color scheme menu and check Show names. Choose the Errors color ramp.

    Modify density colors

    The highest density is near the Downtown precinct. There could be several reasons for this concentration, such as high-density housing areas with more opportunities for robbers and other environmental factors.

    Next, you'll create a density layer for robberies committed in the previous interval of 28 days.

  6. If necessary, reopen the Kernel Density tool. Set the same parameters as before, but change Input point or polyline features to Robberies_Previous28Days and Output raster to Robberies_Previous_28Days_Density.

    Kernel Density parameters for previous 28 days

  7. Click Run.

    The new raster layer, named Robberies_Previous_28Days_Density, is added.

  8. Symbolize the Robberies_Previous28Days_Density layer with the Errors color scheme.

    This layer also shows that the highest density of robberies occurred near the Downtown precinct. Visual comparison reveals little change in the concentration of robberies. You'll see if the concentration changes for the YTD and the previous YTD.

  9. Run the Kernel Density tool again with the same parameters, except for Input point or polyline features, choose Robberies_YTD, and for Output raster, type Robberies_CurrentYTD_Density.
  10. Symbolize the Robberies_CurrentYTD_Density layer with the Yellow to Red color scheme.
  11. On the ribbon, click the Appearance tab. In the Effects group, set Layer Transparency to 50 percent.

    Density of robberies for YTD

    In addition to a high-density concentration near the Downtown precinct, there are several more high-density areas in precincts 4 and 9.

  12. Run the Kernel Density tool again with the same parameters, except for Input point or polyline features, choose Robberies_PreviousYTD, and for Output raster, type Robberies_PreviousYTD_Density.
  13. Symbolize the Robberies_PreviousYTD_Density layer with the Yellow to Red color scheme. Set the layer's transparency to 50 percent.

    Density of robberies for the previous YTD

    You now have four density layers that show concentrations of robberies across four different time periods.

Calculate change in density

The last analysis you'll perform will determine how the density of robberies has increased or decreased within each precinct in the current YTD compared to the previous YTD and the last 28 days to the previous interval of 28 days.

  1. On the ribbon, on the Crime Analysis tab, in the Tactical and Strategic Analysis group, click Density Analysis and choose Density Change.

    The Density Change tool opens.

  2. Adjust the following parameters:
    • For Input Current Period Density Raster, choose Robberies_Last28Days_Density.
    • For Input Previous Period Density Raster, choose Robberies_Previous_28Days_Density.
    • For Output Raster Dataset, type Robberies_28Days_DensityChange.
    • Click the Environments tab and set Mask to Police Precincts.

    28-day change in density

  3. Click Run.

    The new raster layer is added. It displays change in the density of robberies in the last 28 days compared to the previous 28 days.

  4. On the ribbon, click the Appearance tab. In the Effects group, set Layer Transparency to 50 percent. In the Rendering group, set the Resampling Type to Bilinear.

    Density change in robberies for past 28 days

    With the Robberies_28Days_DensityChange layer, the differences between the two density layers are more obvious than the visual comparison. In the example image, the areas in darker red indicate the density of robberies has decreased, and the darker blue areas show an increase. The concentration of robberies in the Downtown precinct has actually decreased recently.

  5. Run the Density Change tool again with the following parameters:
    • For Input Current Period Density Raster, choose Robberies_CurrentYTD_Density.
    • For Input Previous Period Density Raster, choose Robberies_PreviousYTD_Density.
    • For Output Raster Dataset, type Robberies_YTD_DensityChange.

    Density Change parameters for YTD

    The new raster layer is added. It displays the change in density of robberies for the current YTD compared to the previous YTD.

  6. Change the layer transparency to 50 percent and resampling type to bilinear

    Density change in robberies for YTD

    The Robberies_YTD_DensityChange layer reveals an increase in the concentration of robberies near the Downtown precinct. It also reveals changes within each precinct that were not obvious by visual comparison.

  7. Save the project.

You've performed analysis on robbery data and determined the density of robberies for the current and previous 28 days and the current past YTD. You also determined the change in density of robberies for both the 28-day and YTD periods.


Share the results

Previously, you analyzed robberies over space and time. Next, you'll share the results of the analysis as web layers to present in a story map during the CompStat meeting. The best way to share the results of your analysis is in an interactive map that shows how robberies have increased or decreased over time. The percent change and density change layers you created can be shared as web layers and used in the interactive map.

Publish analysis results

First, you'll share the layers you created to your ArcGIS organization.

  1. If necessary, open your project.
  2. In the Contents pane, right-click Robberies 28 Day Percent Change, point to Sharing, and choose Share As Web Layer.
  3. In the Share As Web Layer tool, adjust the following parameters:
    • For Summary, type Percent change in robberies for the last 28 days.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, select Feature.
    • For Location, accept the default.
    • For Share with, check your organization (in the example image, the organization is Learn ArcGIS).

    Share As Web Layer parameters

  4. Click Publish.
    Note:

    You may receive a message that the layer does not have a feature template set. A default template will be created when you share the web feature layer.

  5. Share Robberies_YTD_PercentChange as a web layer with the following parameters:
    • For Summary, type Percent change in robberies for the year to date.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, choose Feature.
    • For Share with, check your organization.

    Next, you'll share the density layers. Since these are raster layers and not features, they need to be published as tile layers.

  6. Share the Robberies_28Days_DensityChange layer with the following parameters:
    • For Summary, type Change in density of robberies in the last 28 days.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, choose Tile.
    • For Location, accept the default.
    • For Share with, check your organization .

    Share As Web Layer parameters

  7. Share the Robberies_YTD_DensityChange layer with the following parameters:
    • For Summary, type Change in density of robberies for the year to date.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, choose Tile.
    • For Share with, check your organization.

    You'll also share the feature layers created for robberies for each of the four time intervals. In the web map, you'll display the actual location of each robbery on top of the percent change and density change maps.

  8. Share the Robberies_YTD layer with the following parameters:
    • For Summary, type Robberies committed for the year to date.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, choose Feature.
  9. Share the Robberies_PreviousYTD layer with the following parameters:
    • For Summary, type Robberies committed in the previous year to date.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, choose Feature.
  10. Share the Robberies_Last28Days layer with the following parameters:
    • For Summary, type Robberies committed in the last 28 days.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, choose Feature.
  11. Share the Robberies_Previous28Days layer with the following parameters:
    • For Summary, type Robberies committed in the previous 28 days.
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Layer Type, choose Feature.
  12. Save the project.

Create a web map for historical robbery data

A story map is a type of interactive map that can be shared online. You'll create a story map that shows where the number of robberies has changed within each precinct that you can present at your CompStat meeting. The story map will be built from four web maps, and each web map will contain web layers representing the robbery analysis results that you published.

First, you'll create the four web maps, starting with Robberies_Last28 Days_PercentChange and Robberies_Previous28Days.

  1. Sign in to your ArcGIS organization and browse to your published robbery layers.

    All shared robbery layers

  2. Click Map at the top of the site.
  3. In the map, click Add and click Search for layers.
  4. Search for Robberies.
  5. In the search results, locate Robberies_Last28 Days_ PercentChange.
  6. Click Add to Map.

    Search and add crime analysis layers

    In addition, you will add the Human Geography Dark Living Atlas layers to your map. These layers are designed to be used as a basemap for overlaying other layers of information and thus include highways, major roads, minor roads, railways, water features, building footprints, and administrative boundaries.

  7. Click My Content and change the search location to Living Atlas.
  8. Search for Human Geography Dark.
  9. Add the following layers to the map:
    • Human Geography Dark Label
    • Human Geography Dark Detail
    • Human Geography Dark Base

    Search and add human geography base layers

  10. In the Contents pane, right-click Human Geography Dark Base, and then click More Options and choose Move to Basemap.
  11. Move the Human Geography Dark Label and Human Geography Dark Detail layers to the basemap.
  12. Rename the current basemap to Dark Basemap.
  13. Expand Dark Basemap and remove any original basemap layers.

    Next you will update and configure the Robberies_Last28 Days_ PercentChange layer for publication.

  14. For Robberies_Last28 Days_PercentChange, click More Options and set Transparency to 50 percent.
  15. For Robberies_Last28 Days_PercentChange, click More Options and choose Configure Pop-up.
  16. On the Configure Pop-ups dialog box, for Pop-up-Title, choose {name}.
  17. For Pop-up-Contents, click Configure Attributes.
  18. On the Configure Attributes dialog box, check the following:
    • Current Count
    • Previous_Count
    • Difference
    • Percent_Change
  19. Uncheck all other fields.
  20. Click OK to close Configure Attributes.

    Configure Pop-up for robberies of last 28 days

  21. On the map, click any precinct to review the pop-up.

    Pop-up text for robberies last 28 days percent change

  22. Add the Robberies_Last28Days layer to the map.
  23. For the Robberies_Last28Days layer, configure the pop-up to display the ucrdesc field as the Pop-up Title and the Offense ID, Full Address, and Offense Date fields as Pop-up Contents.

    Configure Pop-up

  24. On the map, click any robbery point to review the pop-up.

    Pop-up with robbery information

  25. Add the Robberies_Previous28Days layer to the map.
  26. For the Robberies_Previous28Days layer, configure the pop-up to display the ucrdesc field as the Pop-up Title and the Offense ID, Full Address, and Offense Date fields as Pop-up-Contents.

    You have almost completed setup and configuration of the first of the four maps you will use in the CompStat meeting.

  27. In the Contents pane, ensure Robberies_Last28Days_PercentChange is turned on.
  28. Turn off Robberies_Last28Days and Robberies_Previous28Days.
    Note:

    Robberies_Last28Days and Robberies_Previous28Days will be turned on using a story actions.

  29. On the ribbon, click Save and click Save As. For Title, type Robberies 28 Day Percent Change Map.
  30. In edit the item details, do the following:
    • For Tags, type Local Government, Public Safety, Police, and Crime Analysis.
    • For Summary, type Robberies 28 Day Percent Change Map.

    Your Compstat meeting requires three additional maps, a Robberies YTD Percent Change Map, a Robberies 28 Day Density Change, and a Robberies YTD Density Change map. You will create these next.

Create web maps of analysis results

The story map you want to present still needs three web maps. These will show the Robberies YTD Percent Change Map, Robberies 28 Day Density Change, and Robberies YTD Density Change layers.

  1. Create a second map titled Robberies YTD Percent Change Map.
  2. Replace the default basemap with the Human Geography Dark Label, Human Geography Dark Detail, and Human Geography Dark layers.
  3. Add the following layers to the map:
    • Robberies YTD Percent Change
    • Robberies_YTD
    • Robberies_PreviousYTD
  4. For the Robberies YTD Percent Change layer, click More Options and set Transparency to 50 percent.
  5. For Robberies_Last28 Days_ PercentChange, configure the pop-up to display the name field as the Pop-up Title and the Current Count, Previous_Count, Difference, and Percent_Change fields as Pop-up Contents.

    Robberies YTD Percent Change Map

  6. For the Robberies_YTD and Robberies_PreviousYTD layers, configure the pop-ups to display the ucrdesc field as the Pop-up Title and the Offense ID, Full Address, and Offense Date fields as Pop-up Contents.
  7. Before saving the Robberies YTD Percent Change map, turn on the Robberies YTD_PercentChange layer and turn off Robberies_YTD and Robberies_PreviousYTD.
  8. Save the map.

    Now you'll create the Robberies 28 Day Density Change map.

  9. Open a third map titled Robberies 28 Day Density Change.
  10. Replace the default basemap with the Human Geography Dark Label, Human Geography Dark Detail, and Human Geography Dark layers.
  11. Add the following layers to the map:
    • Robberies 28 Day Density Change
    • Robberies_Last28Days
    • Robberies_Previous28Days
  12. For the Robberies_Last28Days and Robberies_Previous28Days layers, configure the pop-ups to display the ucrdesc field as the Pop-up Title and the Offense ID, Full Address, and Offense Date fields as Pop-up Contents.

    Robberies 28 Day Density Change Map

  13. Before saving the Robberies YTD Percent Change Map, turn on the Robberies 28 Day Percent Change layer and turn off Robberies_Last28Days and Robberies_Previous28Days.
    Note:

    The Robberies_Last28Days and Robberies_Previous28Days layers will be turned on using a story action in the story map.

  14. Save the map.
  15. Create and configure a fourth map titled Robberies YTD Density Change.
  16. Replace the default basemap with the Human Geography Dark Label, Human Geography Dark Detail, and Human Geography Dark layers.
  17. Add the following layers to the map:
    • Robberies YTD Density Change
    • Robberies_YTD
    • Robberies_PreviousYTD
  18. For the Robberies_YTD and Robberies_PreviousYTD layers, configure the pop-ups to display the ucrdesc field as the Pop-up Title and the Offense ID, Full Address, and Offense Date fields as Pop-up Contents.

    Robberies YTD Density Change Map

  19. Before saving the Robberies YTD Density Change Map, turn on the Robberies YTD Density Change layer and turn off Robberies_YTD and Robberies_PreviousYTD.
  20. Save the map.

    You have now created four web maps named Robberies 28 Day Percent Change, Robberies YTD Percent Change, Robberies 28 Day Density Change, and Robberies YTD Density Change. You will be presenting these maps and associated layers using a story map during the CompStat meeting.

Configure a CompStat story map

In preparation for the CompStat meeting, you need to assemble and configure a story map illustrating the results of your analysis of robberies. Since you have investigated robberies for the last and previous 28 days, as well as robberies for the current and previous year to date, you will use a Map Series story map.

  1. Go to the StoryMaps Classic website. If necessary, sign in and, on the ribbon, click My Stories.
  2. On the Story Maps page, click Create Story.

    Create Story

  3. In the Create a New Story pane, choose Map Series.

    Choose Map Series story map

    Note:

    For more information, review the Story Map Series tutorial.

  4. In the Welcome to Map Series Builder pane, choose Tabbed.

    Choose Tabbed Map Series

  5. Click Start to begin building your tabbed story map.
  6. In the What do you want to call your Tabbed Map Series window, type CompStat Meeting.
  7. Click the forward arrow.

    Your final story map consists of four tabs, each displaying the content of one of your four web maps.

  8. In the Add Tab pane, type Robberies 28 Day Percent Change for the title of the first tab.
  9. On the Map dialog box, choose Select a map.

    Add Tab title

  10. In the Select a map pane, type robberies in the search box.
  11. In the search results, select the Robberies 28 Day Percent Change Map web map.

    Search and select tab map

  12. In the Add Tab pane, verify Robberies 28 Day Percent ChangeMap has been added, and then click Add to begin configuring story actions for the tab.

    Add map to tab

  13. In the Story Actions text pane, type View Robberies for Previous 28 Days.
  14. In the text string, highlight Previous 28 Days and click the camera icon to change the main stage content for the first tab.

    Add story action text

  15. In the Change the Main Stage Content pane, for Content, click Custom configuration.

    Customize main stage content

  16. In the Map Content pane, check both Robberies_Last28 Days_ PercentChange and Robberies_Previous28 Days, and then click Save Map Content.

    Select initial map content

  17. In the Change the Main Stage Content pane, click Apply.
  18. In the Story Actions text pane, type View Robberies for Last 28 Days.
  19. In the text string, highlight Last 28 Days and click the camera icon.
  20. In the Change the Main Stage Content pane, for Content, click Custom configuration.
  21. In the Map Content pane, check both Robberies_Last28 Days_ PercentChange and Robberies_Last28 Days, and then click Save Map Content.

    Select main stage content

  22. In the Change the Main Stage Content pane, click Apply.
  23. In the Story Actions pane, type View Robberies for both Previous and Last 28 Days.
  24. In the text string, highlight Previous and Last 28 Days, and then for Story Actions, click the camera icon.
  25. In the Change the Main Stage Content pane, for Content, click Custom configuration.
  26. In the Map Content pane, check all three layers and click Save Map Content.

    Select tab map content

  27. In the Change the Main Stage Content pane, click Apply.

    Your Robberies 28 Day Percent Change tab has three story actions configured.

    Robberies 28 Day Percent Change map tab

    You have now successfully added and configured your first tab showing current and previous 28-day robberies. Next you will add additional tabs for Robberies YTD Percent Change, Robberies 28 Day Density Change, and Robberies YTD Density Change.

Add more tabs

To add tabs for Robberies YTD Percent Change, Robberies 28 Day Density Change, and Robberies YTD Density Change, complete the following steps:

  1. Add a second tab titled Robberies YTD Percent Change.
  2. For Map, select Robberies YTD Percent Change Map.
  3. In the Story Actions pane, type View Robberies for Previous YTD, and then highlight Previous YTD and update the map content to display the Robberies_YTD_PercentChange and Robberies_PreviousYTD layers.
  4. In the Story Actions pane, type View Robberies for YTD, and then highlight YTD and update the map content to display Robberies_YTD_PercentChange and Robberies_YTD.
  5. In the Story Actions pane, type View Robberies for both YTD and Previous YTD, and then highlight YTD and Previous YTD and update the map content to display all three layers.

    Robberies YTD Percent Change Map Tab

  6. Add a third tab titled Robberies 28 Day Density Change.
  7. For Map, select Robberies 28 Day Density Change Map.
  8. In the Story Actions pane, type View Robberies for Previous 28 Days, and then highlight Previous 28 Days and update the map content to display Robberies_28Days_DensityChange and Robberies_Previous28Days.
  9. In the Story Actions pane, type View Robberies for Last 28 Days, and then highlight Last 28 Days and update the map content to display Robberies_28Days_DensityChange and Robberies_Last28Days.
  10. In the Story Actions pane, type View Robberies for both Previous and Last 28 Days, and then highlight Previous and Last 28 Days and update the map content to display all three layers.

    Robberies 28 Day Density Change tab

  11. Add a fourth tab titled Robberies YTD Density Change.
  12. For Map, select Robberies YTD Density Change Map.
  13. For Story Actions, type View Robberies for Previous YTD, and then highlight Previous YTD and update the map content to display Robberies_YTD_DensityChange and Robberies_PreviousYTD.
  14. For Story Actions, type View Robberies for YTD, and then highlight Robberies for YTD and update the map content to display Robberies_YTD_DensityChange and Robberies_YTD.
  15. For Story Actions, type View Robberies for YTD and Previous YTD, and then highlight YTD and Previous YTD and update the map content to display all three layers.

    Robberies YTD Density Change tab

  16. Save the story map.
  17. Click View Story to preview your finished story map.

    CompStat story map

  18. Click the Save button in the upper right corner of the builder to ensure that all your work is saved.

    Your CompStat Story Map Series is now operational. You have completed analysis on robberies data using the Crime Analysis solution tools, and you produced a story map of results in preparation for the CompStat meeting.

  19. Click the Share button at the top of the builder to share your work.
    Note:

    You can share your CompStat story map publicly, or, if you're using an ArcGIS account, you'll also see the option to share your story so it is accessible only within your organization.

  20. Click View Story to preview your final story map.

    Preview an example of the finished CompStat story map.

    Note:

    To manage your story maps, go to My Stories. My Stories lists all the Story Maps apps you have created that are hosted in ArcGIS Online. It allows you to edit your stories, review their content, check them for issues, and upload thumbnails for them.

    Note:

    See the Fire Situation Awareness tabbed story map for an additional example you can use for ideas on customizing your own CompStat story map.

Using ArcGIS Solutions, you downloaded and deployed the Crime Analysis solution and used it for analyses of robbery data. Now that you've downloaded the add-in, if you want to deploy additional solutions in the future, you can access them through the Share tab in ArcGIS Pro. To learn more about ArcGIS Solutions, visit the ArcGIS Solutions web page. The Solutions Gallery highlights the various solutions available for multiple industries across all ArcGIS products and applications.

You can find more lessons in the Learn ArcGIS Lesson Gallery.