ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Create Space Time Cube

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Summarizes a set of points into a netCDF data structure by aggregating them into space-time bins. Within each bin, the points are counted. For all bin locations, the trend for counts over time are evaluated.

Learn more about how the Create Space Time Cube works

Illustration

Space Time Cube Creation

Usage

  • This tool aggregates your point Input Features into space-time bins. The data structure it creates may be thought of as a three-dimensional cube made up of space-time bins with the x and y dimensions representing space and the t dimension representing time.

    Space-time bins in a three-dimensional cube

  • Every bin has a fixed position in space (x,y) and in time (t). Bins covering the same (x, y) area share the same location ID. Bins encompassing the same duration share the same time-step ID. Because the cube is always rectangular even if your point data is not, some locations will have point counts of zero for all time steps. For many analyses, only locations with data—with at least one point count greater than 1 for at least one time step—will be included in the analysis.

    Locations in the space-time cube

  • The Input Features should be points representing event data, such as crime or fire events, disease incidents, or traffic accidents. Each point should have a date associated with it. The field containing the event timestamp must be of type Date. The tool requires a minimum of 60 points and a variety of timestamps. The tool will fail if the parameters specified result in a cube with more than two billion bins.

  • This tool requires projected data to accurately measure distances.

  • Output from this tool is a netCDF representation of your input points as well as messages summarizing cube characteristics written to the Results window. The netCDF file created may be used as input to the Emerging Hot Spot Analysis tool. See Visualizing the Space Time Cube to get strategies allowing you to look at cube contents.

  • Select a field of type Date for the Time Field parameter. This field should contain the timestamp associated with each point feature.

  • The Time Step Interval defines how you want to partition your aggregated points across time. You might decide to aggregate points using one-day, one-week, or one-year intervals, for example. Time-step intervals are always fixed durations, and the tool requires a minimum of ten time steps. If you do not provide a Time Step Interval value, the tool will calculate one for you. See Learn more about how the Create Space Time Cube works for details on how default time-step intervals are computed. Valid time-step interval units are Years, Months, Days, Hours, Minutes, and Seconds.

    Type the Time Step Interval as an integer value and a unit value. Example time-step interval entries are 1 Weeks, 2 Weeks, 13 Days, or 1 Months.

    Note:

    While a number of time units appear in the Time Step Interval drop-down list, the tool only supports Years, Months, Weeks, Days, Hours, Minutes, and Seconds.

  • You should create a Template Cube to use each time you run your analysis, especially if you want to compare data for a series of time periods. By providing a template cube, you ensure the extent of your analysis, bin size, time-step interval, reference time, and time-step alignment are always consistent.

  • If you provide a Template Cube, input points that fall outside of the template cube extent will be excluded from analysis. Also, if the spatial reference associated with the input point features is different from the spatial reference associated with the template cube, the tool will project the Input Features to match the template cube before beginning the aggregation process. The spatial reference associated with the template cube will override Output Coordinate System settings as well. In addition, the Template Cube, when specified, will determine the processing extent used, even if you specify a different processing extent.

  • The Reference Time may be a date and time value or just a date value; it may not be just a time value. The expected format is determined by the computer's regional time settings.

  • The Distance Interval specifies how large the space-time bins should be. The bins are used to aggregate your point data. You may decide to make each bin 50 meters by 50 meters, for example. Unless a Template Cube is specified, the bin in the upper left corner of the cube will be centered on the upper left corner of the spatial extent for your Input Features. You will want to select a distance interval that makes sense to your analysis. You should find the balance between making your distance interval too large and losing the underlying patterns in your point data, and making your distance interval too small so you end up with a cube filled with zero counts. If you do not provide a Distance Interval value, the tool will calculate one for you. See Learn more about how the Create Space Time Cube works for details on how default distance intervals are computed. The distance interval units supported are Kilometers, Meters, Miles, and Feet.

    Note:

    While a number of distance units appear in the Distance Interval drop-down list, the tool only supports Kilometers, Meters, Miles, and Feet.

  • The trend analysis performed on the aggregated count data is based on the Mann-Kendall statistic.

Syntax

CreateSpaceTimeCube_stpm (in_features, output_cube, time_field, {template_cube}, {time_step_interval}, {time_step_alignment}, {reference_time}, {distance_interval})
ParameterExplanationData Type
in_features

The input point feature class to be aggregated into space-time bins.

Feature Layer
output_cube

The output netCDF data cube that will be created to contain counts and summaries of the input feature point data.

File
time_field

The field containing the date and time (timestamp) for each point. This field must be of type Date.

Field
template_cube
(Optional)

A reference space-time cube used to define the output_cube extent of analysis, bin dimensions, and bin alignment. The time_step_interval, distance_interval, and reference_time values are also obtained from the template cube. This template cube must be a netCDF (.nc) file that has been created using this tool.

File
time_step_interval
(Optional)

The number of seconds, minutes, hours, days, weeks, or years that will represent a single time step. All points within the same Time Step Interval and Distance Interval will be aggregated. (When a Template Cube is provided, this parameter is ignored, and the Time Step Interval value is obtained from the template cube). Examples of valid entries for this parameter are 1 Weeks, 13 Days, or 1 Years.

String
time_step_alignment
(Optional)

Defines how aggregation will occur based on a given time_step_interval. If a template_cube is provided, the time_step_alignment associated with the template_cube overrides this parameter setting and the time_step_alignment of the template_cube is used.

  • END_TIME —Time steps align to the last time event and aggregate back in time.
  • START_TIME —Time steps align to the first time event and aggregate forward in time.
  • REFERENCE_TIME —Time steps align to a particular date/time that you specify. If all points in the input features have a timestamp larger than the reference time you provide (or it falls exactly on the start time of the input features), the time-step interval will begin with that reference time and aggregate forward in time (as occurs with a START_TIME alignment). If all points in the input features have a timestamp smaller than the reference time you provide (or it falls exactly on the end time of the input features), the time-step interval will end with that reference time and aggregate backward in time (as occurs with an END_TIME alignment). If the reference time you provide is in the middle of the time extent of your data, a time-step interval will be created ending with the reference time provided (as occurs with an END_TIME alignment); additional intervals will be created both before and after the reference time until the full time extent of your data is covered.
String
reference_time
(Optional)

The date/time to use to align the time-step intervals. If you want to bin your data weekly from Monday to Sunday, for example, you could set a reference time of Sunday at midnight to ensure bins break between Sunday and Monday at midnight. (When a template_cube is provided, this parameter is ignored and the reference_time is based on the template_cube.)

Date
distance_interval
(Optional)

The spatial extent of the bins used to aggregate the in_features. All points that fall within the same distance_interval and time_step_interval will be aggregated. (When a template_cube is provided, this parameter is ignored and the distance interval value will be based on the template_cube.)

Double

Code Sample

CreateSpaceTimeCube example 1 (Python window)

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

arcpy.env.workspace = r"C:\STPM"
arcpy.CreateSpaceTimeCube_stpm("Homicides.shp", "Homicides.nc", "OccDate", "#", "3 Months", 
                               "End time", "#", "3 Miles")
CreateSpaceTimeCube example 2 (stand-alone Python script)

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

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

# Import system modules
import arcpy

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

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

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

    # Create Space Time Cube of homicide incident data with 3 months and 3 miles settings
    # Process: Create Space Time Cube 
    cube = arcpy.CreateSpaceTimeCube_stpm("Homicides.shp", "Homicides.nc", "MyDate", "#", 
                                          "3 Months", "End time", "#", "3 Miles")

    # Create a polygon that defines where incidents are possible  
    # Process: Minimum Bounding Geometry of homicide incident data
    arcpy.MinimumBoundingGeometry_management("Homicides.shp", "bounding.shp", "CONVEX_HULL",
                                             "ALL", "#", "NO_MBG_FIELDS")

    # Emerging Hot Spot Analysis of homicide incident cube using 5 Miles neighborhood 
    # distance and 2 neighborhood time step to detect hot spots
    # Process: Emerging Hot Spot Analysis 
    cube = arcpy.EmergingHotSpotAnalysis_stpm("Homicides.nc", "COUNT", "EHS_Homicides.shp", 
                                              "5 Miles", 2, "bounding.shp")

except arcpy.ExecuteError:
    # If any error occurred when running the tool, print the messages
    print(arcpy.GetMessages())

Environments

  • Current Workspace
  • Scratch Workspace
  • Output Coordinate System
    Note:

    The spatial reference associated with the Template Cube, when specified, will over ride the Output Coordinate System environment setting.

  • Geographic Transformations
  • Extent
    Note:

    The processing extent of the Template Cube, when specified, will over ride the environment setting processing extent.

  • Qualified Field Names

Licensing Information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • How Create Space Time Cube works
  • Emerging Hot Spot Analysis
  • Visualizing the Space Time Cube
  • What is a z-score? What is a p-value?
  • An overview of the Space Time Pattern Mining toolbox
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal