Visualize Space Time Cube in 2D (Space Time Pattern Mining)

Summary

Visualizes the variables stored in a netCDF cube and the results generated by the Space Time Pattern Mining tools. Output from this tool is a two-dimensional representation uniquely rendered based on the variable and theme specified.

Illustration

Visualizing a space-time cube in two dimensions

Usage

  • This tool can only accept netCDF files created by the Create Space Time Cube By Aggregating Points, Create Space Time Cube From Defined Locations, and Create Space Time Cube from Multidimensional Raster Layer tools.

  • The Locations with data option in the Display Theme parameter allows you to see all locations that contain data for the chosen variable, and the Trends option shows you where values have been increasing or decreasing over time (the results of the Mann-Kendall statistic run on the specified Cube Variable for each location). Both Locations with data and Trends are always available after creation of the cube.

  • Hot and cold spot trends shows you where hot and cold spot z-scores are increasing or decreasing over time (the results of the Mann-Kendall statistic run on the z-scores of the space-time hot spot analysis for the specified Cube Variable), and Emerging Hot Spot Analysis results re-creates the results returned when you ran the Emerging Hot Spot Analysis tool. Both Hot and cold spot trends and Emerging Hot Spot Analysis results are only available when Emerging Hot Spot Analysis has been run on the specified Cube Variable.

  • Time Series Clustering results re-creates the results returned when you initially ran the Time Series Clustering tool.

  • Percentage of local outliers, Local outlier in most recent time period, Local Outlier Analysis results, and Locations without spatial neighbors are only available when you have run the Local Outlier Analysis tool. Percentage of local outliers shows you the proportion of total outliers at each location, and Local outlier in most recent time period shows you all of the outliers that occurred in the most recent time step of your space-time cube. Local Outlier Analysis results re-creates the results returned when you initially ran the Local Outlier Analysis tool. Locations without spatial neighbors displays all locations that have no spatial neighbors within the Neighborhood Distance that was specified when you ran Local Outlier Analysis. As a result, these locations rely only on temporal neighbors for analysis calculations.

  • Number of estimated bins shows the number of bins that were estimated at each unique location, allowing you to see if there is a spatial pattern of places with missing values. If entire sections of the map have high numbers of estimated bins, that area may be best left out of the analysis. Locations excluded from analysis shows those places that had data but had empty bins that could not be filled because they did not meet the criteria for estimation. Both Number of estimated bins and Locations excluded from analysis are only available for Summary Fields.

  • The Display Theme parameter's Forecast results option allows you to re-create the results from when you originally ran a tool in the Time Series Forecasting toolset.

  • The Display Theme parameter's Time series outlier results option indicates locations containing bins that were considered temporal outliers for the selected Cube Variable parameter and the analysis that is run.

Syntax

arcpy.stpm.VisualizeSpaceTimeCube2D(in_cube, cube_variable, display_theme, output_features, enable_time_series_popups)
ParameterExplanationData Type
in_cube

The netCDF cube that contains the variable to be displayed. This file must have an .nc extension and must have been created using either the Create Space Time Cube By Aggregating Points, Create Space Time Cube From Defined Locations, or Create Space Time Cube from Multidimensional Raster Layer tool.

File
cube_variable

The numeric variable in the netCDF cube to explore. The space-time cube will always contain the COUNT variable. Any Summary Fields or Variables will also be available if they were included when the cube was created.

String
display_theme

Specifies the characteristic of the Cube Variable to display. Options will vary depending on how the cube was created and the analyses that were run.

If the cube was created by aggregating points, Locations with data and Trends will always be available. Number of estimated bins and Locations excluded from analysis will only be available for those Summary Fields that were included in the cube creation process.

If the cube was created from defined locations, Trends will be available for those Summary Fields or Variables that were included in the cube creation process.

Hot and cold spot trends and Emerging Hot Spot Analysis results will only be available after Emerging Hot Spot Analysis has been run on the selected Cube Variable. Percentage of local outliers, Local outlier in the most recent time period, Local Outlier Analysis results, and Locations without spatial neighbors are only available when the Local Outlier Analysis tool has been run.

Forecast results will only be available for cubes created by tools in the Time Series Forecasting toolset. The Time series outlier results option will only be available when the Outlier Option parameter in the Time Series Forecasting tools has been specified.

  • LOCATIONS_WITH_DATADisplays all locations that contain data for the Cube Variable parameter.
  • TRENDSDisplays the trend of values at each location determined using the Mann-Kendall statistic.
  • HOT_AND_COLD_SPOT_TRENDSDisplays the trend of z-scores at each location determined using the Mann-Kendall statistic.
  • EMERGING_HOT_SPOT_ANALYSIS_RESULTSDisplays the results of Emerging Hot Spot Analysis for the specified Cube Variable parameter.
  • LOCAL_OUTLIER_ANALYSIS_RESULTSDisplays the results of Local Outlier Analysis for the specified Cube Variable parameter.
  • PERCENTAGE_OF_LOCAL_OUTLIERSDisplays the total percentage of outliers at each location.
  • LOCAL_OUTLIER_IN_MOST_RECENT_TIME_PERIODDisplays outliers occurring in the most recent time period.
  • TIME_SERIES_CLUSTERING_RESULTSDisplays the results of Time Series Clustering for the specified Cube Variable parameter.
  • LOCATIONS_WITHOUT_SPATIAL_NEIGHBORSDisplays locations that have no spatial neighbors for the last analysis run. These locations rely only on temporal neighbors for analysis.
  • NUMBER_OF_ESTIMATED_BINSDisplays the number of bins that were estimated for each location.
  • LOCATIONS_EXCLUDED_FROM_ANALYSISDisplays the locations that were excluded from analysis because they had empty bins that did not meet the criteria for estimation.
  • FORECAST_RESULTSDisplays the results of the Time Series Forecasting tool used for the specified Analysis Variable parameter.
  • TIME_SERIES_OUTLIER_RESULTSDisplays the results of the Outlier Option parameter in the Time Series Forecasting tools.
String
output_features

The output feature class results. This feature class will be a two-dimensional map representation of the specified display variable.

Feature Class
enable_time_series_popups

Specifies whether time series pop-ups will be generated for each output feature. Pop-up charts are not supported for shapefile outputs.

  • CREATE_POPUPTime series pop-ups will be generated for each feature in the dataset.
  • NO_POPUPTime series pop-ups will not be generated. This is the default.
Boolean

Code sample

VisualizeSpaceTimeCube2D example 1 (Python window)

The following Python window script demonstrates how to use the VisualizeSpaceTimeCube2D tool.

import arcpy
arcpy.env.workspace = r"C:\STPM"
arcpy.VisualizeSpaceTimeCube2D_stpm("Homicides.nc", "AGE_STD_ZEROS", 
                                    "LOCATIONS_EXCLUDED_FROM_ANALYSIS", 
                                    "Homicides_Age_LocExc.shp")
VisualizeSpaceTimeCube2D example 2 (stand-alone script)

The following stand-alone Python script demonstrates how to use the VisualizeSpaceTimeCube2D tool.

# Display Space Time Cube of homicide incidents in a metropolitan area

# Import system modules
import arcpy

# Set environment property to overwrite existing output, by default
arcpy.env.overwriteOutput = True

# Local variables...
workspace = r"C:\STPM"

# Set the current workspace (to avoid having to specify the full path to the 
# feature classes each time)
arcpy.env.workspace = workspace

# Display Space Time Cube of homicide with the standard deviation of victim's 
# age, fill no-data as 0
# Only display the locations excluded from analysis.
# Process: Visualize Space Time Cube in 2D 
cube = arcpy.VisualizeSpaceTimeCube2D_stpm("Homicides.nc", "AGE_STD_ZEROS", 
                                           "LOCATIONS_EXCLUDED_FROM_ANALYSIS", 
                                           "Homicides_Age_LocExc.shp")

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics