Exercise: Explore Data Patterns Using Space-Time Pattern Mining
Exercise: Explore Data Patterns Using Space-Time Pattern Mining
Exercise
Explore data patterns using space-
time pattern mining
Section 4 Exercise 2
November 9, 2021
Spatial Data Science MOOC
Time to complete
80 minutes
Introduction
Space-time pattern mining tools use statistics to incorporate the spatial and temporal aspects
of your data to help you understand its spatiotemporal trends.
The initial step in space-time pattern mining is creating a space-time cube. A space-time cube
aggregates your data into a multidimensional cube data structure (netCDF). The cube
aggregates the data into space-time bins with the x and y dimensions representing space and
the t dimension representing time.
Three tools in the Space Time Pattern Mining toolbox can be used to create a space-time
cube. The tool that you use depends on your data and spatial question.
After you create a space-time cube, you can analyze the statistically significant patterns in
your data using the following space-time pattern mining tools.
The Space Time Pattern Mining toolbox also includes the Time Series Forecasting toolset.
This toolset includes four tools that you can use to forecast and estimate future values of a
space-time cube and evaluate and compare different forecast models at each location in a
space-time cube. To learn more about the Time Series Forecasting toolset, see ArcGIS Pro
Help: An overview of the Time Series Forecasting toolset.
In this exercise, you will create a space-time cube to use in an Emerging Hot Spot Analysis
and Local Outlier Analysis.
Exercise scenario
You are assisting in outreach efforts for the Supplemental Nutrition Assistance Program
(SNAP). You completed a Hot Spot Analysis and Outlier Analysis to identify areas with
statistically significantly high SNAP participation in the contiguous United States during 2016.
To continue your analysis, you will use space-time pattern mining tools to determine how
these participation rates have changed over time.
c In the bottom-left corner of the ArcGIS Pro Start page, click Open Another Project.
Note: If you have configured ArcGIS Pro to start without a project template or with a default
project, you will not see the Start page. On the Project tab, click Open, and then click Open
Another Project.
a In the Geoprocessing pane, search for and open the Create Space Time Cube From
Defined Locations tool.
Hint: If you closed the Geoprocessing pane, from the Analysis tab, in the Geoprocessing
group, click Tools.
The input to this tool can be a feature class with repeating shapes or a feature class with one
set of shapes and a related table containing the attributes recorded over time. You will use a
feature class of the counties and a related table of SNAP participation rates for each county
from 2000 to 2016.
i For Time Step Interval, type 1 and update the second parameter to Years.
Because you did not need a temporal aggregation, the Time Step Interval should match the
time intervals of your data (yearly).
k For Variables, set the Field to SNAPRate, and then set Fill Empty Bins With to Space-Time
Neighbors.
Variables are the fields with the attribute values that change over time. If your data is missing
a value for a specific bin, you can specify what to do with that bin. This decision depends on
your data and analysis question. If you are analyzing crime and there is an empty bin, that may
mean no crimes took place at that location during that specific time, or it could mean that no
data was collected. If the empty bin represents an absence of crime, the bin should be filled
with a value of zero. If the empty bin represents the absence of data, the bin should be
dropped or filled by averaging its spatial and/or temporal neighbors.
l Click Run.
The tool creates a netCDF file that will not display in the map, but it is saved to the location
that you specified in the Output Space Time Cube parameter. You can find the file path for
the cube in the Output Space Time Cube parameter after running the tool.
The tool message window will inform you that the tool completed successfully but with
warnings. You will review the warnings to gather more information.
According to Total Observations, 28 of the 52,785 observations were estimated. The number
of estimated observations aligns with the number of null values (28), indicating that the tool
was able to successfully estimate values for each bin. The number of estimated locations is
nine, which means that some of the 28 observations (or bins) were at the same location but
different years.
b In the Geoprocessing pane, click the Back button , and then search for and open the
Visualize Space Time Cube In 2D tool.
i Click Run.
Trends uses the Mann-Kendall statistic to identify areas that have increased (purple) or
decreased (green) SNAP participation rates over time. The varying shades of these colors
indicate how confident that you can be that these increased and decreased trends are not
random and represent meaningful patterns.
j Zoom to an area on the map, and then click one of the counties.
A time-series pop-up window appears. Time-series pop-ups include a chart that visualizes the
time-series trends for each county. You can use the chart to better understand the overall
trend of a county's SNAP participation and identify its yearly SNAP participation rates.
a In the Catalog pane, under Maps, right-click Space-Time Pattern Mining 3D and choose
Open Local View.
b In the Geoprocessing pane, search for and open the Visualize Space Time Cube In 3D
tool, and then set the following parameters:
• Input Space Time Cube: US_SNAPRate_1Yr_STN.nc (Hint: Use the Browse button.)
• Cube Variable: SNAPRATE_NONE_SPACE_TIME_NEIGHBORS
• Display Theme: Value
• Output Features: US_SNAPRate_1Yr_STN_Value3D
c Click Run.
Note: It may take a few minutes for the 3D layer to appear. Processing time for 3D
visualization can be affected by a few factors, including your computer's graphics card and the
number of features to display. If the layer does not display in a few minutes, try zooming in to
the screen so that there are fewer features to display at one time.
A 3D layer of SNAP participation rates appears in the scene. You can zoom and pan the scene
to examine individual counties.
d From the Map tab, in the Navigate group, click Bookmarks and choose View Values.
Each column represents the SNAP participation rates for a county over time.
A pop-up window appears that includes the county information and SNAP participation rate
for the specified year.
Creating and visualizing a space-time cube transforms your spreadsheet of data into an
interactive 3D view. You can easily see the SNAP participation rates for each county and how
the rates have changed over time. Next, you will determine if there is statistically significant
clustering in this data.
a At the top of the scene view, click the Space-Time Pattern Mining 2D map tab.
c From the Map tab, in the Navigate group, click Bookmarks and choose Contiguous US.
d In the Geoprocessing pane, search for and open the Emerging Hot Spot Analysis tool.
the band does not reach the specified number of spatial neighbors. In these cases, the
distance band will extend to reach the specified number of spatial neighbors.
m Click Run.
Each location is evaluated based on its hot spot and cold spot results each year and then
categorized (intensifying hot spot, persistent cold spot, and so on) to help you interpret the
results. The layer symbology represents the different categories.
n Open a web browser tab and go to ArcGIS Pro Help: How Emerging Hot Spot Analysis
works.
o Review the Emerging Hot Spot Analysis result symbology, pattern name, and definition.
1. What patterns can you detect from this analysis?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
The Emerging Hot Spot Analysis categories are based on patterns detected over time. Next,
you will visualize this information in 3D.
a At the top of the map view, click the Space-Time Pattern Mining 3D scene tab.
e In the History pane, double-click your previously run Visualize Space Time Cube In 3D tool
to open it.
Your Input Space Time Cube and Cube Variable parameters will remain the same as the last
run, but you will update the other two parameters.
g Click Run.
A 3D layer of hot and cold spots appears in the scene. Each column indicates if there were
clusters of high or low SNAP participation rates for each year. By comparing the 2D and 3D
analysis results, you can gain a better understanding of the yearly trends that contributed to
each category.
h At the top of the scene view, right-click the Space-Time Pattern Mining 3D scene tab and
choose New Vertical Tab Group.
The map and scene appear side by side. You can link these views so that moving one view will
automatically update the other view.
i From the View tab, in the Link group, click the Link Views down arrow and choose Center
And Scale.
Note: Your views may differ slightly from the preceding graphic.
At this location, you can see the difference in yearly values between oscillating and
consecutive hot spots.
This information provides additional insight into your data. Based on these patterns, you may
want to investigate areas with oscillating hot spots to see if the increase in SNAP participation
rates requires additional resources that can improve access to healthy foods.
Before you continue, you will unlink the map and scene and move the scene back so that each
view is displayed separately.
k To unlink your map and scene, from the View tab, in the Link group, click Link Views.
l To no longer view the map and scene side by side, right-click the Space-Time Pattern
Mining 3D scene tab and choose Move To Previous Tab Group.
d In the Geoprocessing pane, search for and open the Local Outlier Analysis tool, and then
set or confirm the following parameters:
If you are comparing the results of this tool to other Space-Time Pattern Mining
tools, use the same parameters to ensure that the analysis is consistent.
Note: The permutations in the Local Outlier Analysis tool compare your data values to a set of
randomly generated values. Therefore, your results may vary slightly from the preceding
graphic.
Each feature is evaluated and then categorized (High-High Cluster, High-Low Outlier, and so
on) to help you interpret the results. Clusters indicate areas where the only statistically
significant type throughout time has been a high or low cluster. Outliers indicate areas where
the only statistically significant type throughout time has been a High-Low or Low-High
Outlier. Multiple types indicate areas where there have been multiple types of statistically
significant clusters and/or outliers throughout time.
d In the History pane, double-click the previously run Visualize Space Time Cube In 3D tool
to open it, and then update the following parameters:
e Click Run.
f Click the Space-Time Pattern Mining 2D map tab, and then in the Contents pane, right-
click the US_SNAPRate_1Yr_STN_LO layer and choose Copy.
g Return to the Space-Time Pattern Mining 3D scene, and then in the Contents pane, right-
click Space-Time Pattern Mining 3D and choose Paste.
Adding the 2D Local Outlier Analysis result layer with the 3D Local Outlier Analysis layer can
help you gain a better understanding of the yearly trends that contributed to each category.
This information provides more insight into your data. For example, you may want to
investigate these outliers in further detail to determine if they are the result of environmental
factors, socioeconomic changes, outreach efforts, or a combination of the three.
You have completed an Emerging Hot Spot Analysis and Local Outlier Analysis to help you
evaluate how SNAP participation rates have changed over time. This information can help in
the allocation of SNAP resources to areas of higher food insecurities. The results can help
drive the decision to distribute resources in a more efficient and equitable way.