Skip To Content

Visualize temporal data

Tutorial summary

Play Video

  • Video length: 3:40.
  • This video was created with ArcGIS Pro 2.3.

Geographic data often has an important temporal component. Temporal data—information about features and attributes at different points in time—can help you explore phenomena as diverse as crime trends, the spread of an invasive species, and traffic accident patterns.

In this tutorial, you'll visualize changes in international tourism in New Zealand over the past 20 years—changes that have major business implications for the country. Optionally, you'll export your visualization as a video file that can be shared to social media platforms.

  • Estimated time: 40 minutes, 50 minutes with optional section
  • Software requirements: ArcGIS Pro

Open the project

Tourism is an important and rapidly growing part of New Zealand's economy. It currently generates over 5 percent of the country's GDP and employs more than 7 percent of the workforce. Knowing where tourists come from, which parts of New Zealand they visit, and how long they stay helps planners choose the right locations for hotels, tour companies, and other services.

In this tutorial, you'll visualize changes in the Chinese tourism market in New Zealand. China recently became the second most important tourist market for New Zealand and is expect to surpass Australia as the largest source of visitor revenue within a few years. You'll use data from New Zealand's International Visitors Survey over a 20-year period to map this increase.

  1. Start ArcGIS Pro and sign in if necessary.
  2. On the start page, under your recent projects, click Open another project.
    Note:

    If you already have a project open, click the Project tab on the ribbon. In the list of menu items on the left, click Open. On the Open page, click Portal and click Open another project at the bottom of the page.

  3. On the Open Project dialog box, under Portal Portal, click All Portal All Portal.
  4. At the top of the dialog box, in the Search box, type Visualize temporal data tutorial and press Enter.
  5. In the list of search results, click Visualize temporal data to select the project package.
    Note:

    If there is more than one project package with this name, look at the Owner column. Select the item with the owner name ArcGISProTutorials. If you don't get any search results, see Access the quick-start tutorials.

  6. Click OK.

    The project opens with a map of New Zealand's territorial authority boundaries. Territorial authorities are the second tier of local government in New Zealand, below regional councils. They may represent either cities or local administrative districts.

    Map of New Zealand territorial authorities

    The project is stored in your <user documents>\ArcGIS\Packages folder.

Add an Excel worksheet to the project

The Chinese tourism data is found in an Excel file attached to the project package. You'll add a worksheet from the file to your project as a table.

  1. On the ribbon, on the Map tab, in the Layer group, click Add Data Add Data.
  2. In the Add Data browser, under Project, click Folders to select folders associated with the project.
  3. In the window on the right, browse to Visualize_temporal_data > common data > userdata > ChineseVisitorsByTA.xlsx. Inside the .xlsx file, click the Percent_Chinese_Tourism_by_TA$ worksheet to select it.

    Add Data browser

  4. Click OK.

    The Excel sheet is added as a table to ArcGIS Pro and appears in the Contents pane.

  5. In the Contents pane, under Standalone Tables, right-click Percent Chinese Tourism by TA$ and click Open Open Table.

    Excel sheet displayed as a table

    Each column lists a different territorial authority. Each row lists a year from 1997 to 2017. Cell values represent tourists from China as a percentage of all international tourists. Null values indicate missing or insufficient data—they do not indicate values of zero.

  6. Optionally, if you have Microsoft Excel and want to see the table in its native application, use Windows Explorer to browse to <user documents>\ArcGIS\Packages\Visualize_temporal_data\commondata\userdata and open ChineseVisitorsByTA.xlsx.

    Excel spreadsheet showing the percentage of tourists from China

    Note:

    The Metadata worksheet in the Excel file contains a link to the source data—which has been modified—and more information. This work is based on/includes Stats NZ’s data which are licensed by Stats NZ for reuse under the Creative Commons Attribution 4.0 International license.

  7. If you opened the file in Excel in the previous step, close it now. If you're prompted to save changes, click Don't Save.
  8. On the Quick Access Toolbar, click Save Save to save the project.

Transpose table fields

In the Percent Chinese Tourism By TA$ table, the temporal units are rows and the geographic units are columns. In another table, you might find that the rows are geographic units and the columns are temporal units. In either case, temporal data in ArcGIS works best when unique spatiotemporal values are stored as separate rows in a single column.

This table has 21 rows for years and 64 columns for territories. You need to create a table that stores a row for each of the 1,344 (21 x 64) unique combinations of year and territory. You'll use the Transpose Fields tool to put the data into this format.

  1. In ArcGIS Pro, on the ribbon, click the Analysis tab. In the Geoprocessing group, click Tools Tools.
  2. In the Geoprocessing pane, type Transpose Fields in the search box.

    As you type, search results are returned. The first result should be the Transpose Fields tool.

  3. In the list of search results, click Transpose Fields to open the tool.
  4. For Input Table, click the drop-down arrow and click Percent Chinese Tourism By TA$.
  5. Under Fields to Transpose, next to Field, click the Add Many button Add Many.
  6. At the bottom of the list of fields, click the Toggle All Checkboxes button Toggle All Checkboxes to select all the fields. Scroll to the bottom of the list and uncheck Year.
    Add Many popup
  7. At the bottom of the list of fields, click Add.

    The selected fields in the input table will be transposed to rows in the output table.

  8. Scroll to the bottom of the Geoprocessing pane. For Output Table, delete the default path and type ChineseTourismTransposed.

    The path to your project geodatabase is restored automatically.

  9. For Transposed Field, type TerritorialAuthority.
  10. For Value Field, type ChinesePercentageOfTotal.
  11. For Attribute Fields, click the drop-down arrow on the input box (not the Add Many button) and click Year.

    Your Geoprocessing pane should look as shown below:

    Transpose Fields parameters

    Note:

    You can use any names you want for the Transposed Field and Value Field parameters.

  12. Click Run Run.

    A new table is added to the Contents pane. You'll confirm that the table was saved to your project geodatabase.

  13. In the Catalog pane, expand the Databases folder and expand the visualize_temporal_data geodatabase.

    Contents of project geodatabase

    The project geodatabase contains three items: the table you created and two feature classes that are the source datasets of layers in the map.

    Tip:

    If you don't see the table, right-click the project geodatabase and click Refresh Refresh.

  14. Close the Percent Chinese Tourism by TA$ table.
  15. In the Contents pane, right-click ChineseTourismTransposed and click Open Open Table.
  16. Scroll through the table.

    Transposed table
    The table should contain 1,344 records. Your records may have been processed in a different order.

    The row and column formatting is correct. However, not all the fields have the correct data type.

  17. Hover over the ChinesePercentageOfTotal field heading.

    Pop-up showing properties of the field

    The field values represent percentages, but the field data type is Text. You need a numeric field that displays decimal points. Since you can't change the data type of a field, you'll add a new field and populate it with the same values.

    Note:

    When an Excel table is processed in ArcGIS Pro, fields that contain values of mixed data type—including a combination of numbers and null values—are output as text fields. For more information, see Work with Microsoft Excel files in ArcGIS Pro.

  18. Hover over the Year field heading.

    The data type for this field is Long, a numeric type that stores long integers. Although you can display temporal data when the time values are stored as numbers (or text, for that matter), the best practice is to store them in a date field. You'll run a tool to convert the year values to dates.

    Learn more about ArcGIS field data types.

Add a field and calculate its values

You'll add a numeric field to the table and calculate the percentage values, currently stored as text, into it.

  1. In the Contents pane, click the ChineseTourismTransposed table to select it, if necessary.
  2. On the ribbon, under Table, click the View tab. (Click the highlighted contextual tab, not the core View tab.)
  3. In the Field group, click Add Add Field.

    The Fields view of the ChineseTourismTransposed table opens. The Fields view is used to add and delete fields and modify field properties. In the last row of the Fields view, a new field named Field has been added.

  4. In the last row of the Fields view, in the Field Name column, double-click the name to make it editable. Change the field name to ChinesePercentage and press Enter.
  5. In the same row, in the Data Type column, double-click the default value (Long). In the drop-down list of data types, click Float.

    The Float data type supports decimal places.

  6. On the ribbon, on the Fields tab, in the Changes group, click Save Save.
  7. Close the Fields: ChineseTourismTransposed view.

    The new field displays in the ChineseTourismTransposed table with <Null> values. Now you'll calculate values for the field.

    Tip:

    If you don't see the new field in the table, click the Refresh Table button Refresh table at the bottom of the table view.

  8. In the table, right-click the column heading of the ChinesePercentage field and click Calculate Field Calculate Field.

    The Calculate Field geoprocessing tool opens. The Input Table and Field Name parameters are set correctly.

    Note:

    Most geoprocessing tools create new output datasets. This tool modifies an existing table.

  9. In the Fields list, double-click the ChinesePercentageOfTotal field.

    Calculate Field settings

    The field name is added to the expression box under the list of fields. The complete field calculation reads ChinesePercentage = !ChinesePercentageOfTotal!. (The exclamation points are Python syntax.) When the tool runs, the ChinesePercentage field will have the same values as the ChinesePercentageOfTotal field, but they will be numbers rather than text.

  10. Click Run Run.

    The ChinesePercentage field is populated with numeric values expressed to six decimal places.

  11. Click the column heading of the ChinesePercentageOfTotal field (the text field) to select it.
  12. In the row of tools at the top of the table, click Delete Delete Field.

    Delete Field prompt

  13. On the Delete Field prompt, confirm that you are deleting the correct field. Click Yes.
  14. Click Save Save to save the project.

Convert time values to date format

It's a good practice to put time values in date fields. Although it's not necessary for this tutorial, some advanced analysis operations require it.

  1. In the Geoprocessing pane, click the Back button Back.
  2. In the search box, type Convert Time Field.
  3. Open the Convert Time Field tool. (It should be the first search result.)
  4. Set the Input Table parameter to ChineseTourismTransposed.
  5. Set the Input Time Field parameter to Year.
  6. For Input Time Format, click the Set Format button Set Format. Set the Date Format parameter to yyyy. Ignore the Locale setting.
  7. Confirm that the Output Time Type parameter is set to Date.

    Convert Time Field parameters

  8. Click Run Run.

    The new field is added to the table and populated with dates.

    Table showing new fields

  9. Delete the Year field.
  10. Click Save Save to save the project.

Join the table to the layer

To create a temporal display, you need to join the ChineseTourismTransposed stand-alone table to the Territorial Authorities layer in the map. A join temporarily connects tables, so that attributes from one table (usually a stand-alone table) can by queried or symbolized as if they belonged to another table (usually a layer attribute table).

A join requires that the two tables have a common attribute. In this case, both the Territorial Authorities layer attribute table and the ChineseTourismTransposed table have a field containing the names of territories.

There are 68 records in the Territorial Authorities table (the target table) and 1,344 records in the ChineseTourismTransposed table (the join table). Because one record in the target table will match many records in the join table—all records with the same territory name will match—the join is called a one-to-many join. Learn more about joins.

  1. In the Contents pane, right-click the Territorial Authorities layer and click Attribute Table Open Table.

    There is one record for each territory. Notice that the values in the Name field have underscores rather than spaces between words.

  2. Make the ChineseTourismTransposed table active.

    Names in the TerritorialAuthority field are also separated by underscores. It's not necessary that the names (or aliases) of the common field be the same in both tables. However, it is necessary that the field values be formatted the same way.

  3. Close the ChineseTourismTransposed table.
  4. In the Contents pane, right-click the Territorial Authorities layer, point to Joins and Relates, and click Add Join Add Join.

    The Add Join tool opens in the Geoprocessing pane.

  5. Set the tool parameters as follows:
    • For Layer Name or Table View, choose Territorial Authorities.
    • For Input Join Field, choose Name.
    • For Join Table, choose ChineseTourismTransposed.
    • For Output Join Field, choose TerritorialAuthority.
    Add Join parameters
  6. Click Run Run.

    When the tool finishes, the Territorial Authorities attribute table updates. The attributes from the ChineseTourismTransposed table have been appended to the table.

    Note:

    The joined table has 1,348 records. Four records in the layer attribute table didn't find matching records in the ChineseTourismTransposed table. For these four records, null values are assigned to the joined fields.

  7. Scroll across the table.

    Some of the attributes aren't needed. Rather than deleting them, you'll hide them.

  8. In the attribute table, right-click any column heading and click Fields Fields to open the Fields view of the table.
  9. In the Visible column, uncheck the box in the column heading to turn off the visibility of all fields in the table.
  10. Check the Visible boxes next to the following fields to make them visible:
    • TA2015_NAME (with the alias Name)
    • ChineseTourismTransposed.ChinesePercentage (with the alias ChinesePercentage)
    • ChineseTourismTransposed.Year_Converted (with the alias Year_Converted)
    Note:

    The prefix ChineseTourismTransposed. indicates that these fields come from a joined table. The join applies only to the Territorial Authorities layer attribute table, not to the source feature class table in the geodatabase. You can make a join permanent by exporting the layer to a new feature class with the Copy Features tool.

  11. On the ribbon, on the Fields tab, in the Changes group, click Save Save.
  12. Close the Fields: Territorial Authorities view.

    The Territorial Authorities table should display three fields: Name, ChinesePercentage, and Year_Converted.

  13. Close the table.
  14. Click Save Save to save the project.

Symbolize the territorial authorities

On the map, the territories are symbolized by unique values. You'll switch to a graduated color scheme and use lighter and darker hues to represent lower and higher percentages of Chinese tourists.

  1. In the Contents pane, right-click the Territorial Authorities layer and click Symbology Symbology.

    The Symbology pane appears.

  2. Under Primary symbology, click the drop-down arrow and click Graduated Colors.

    The field to symbolize is automatically set to ChinesePercentage (the only available numeric field).

  3. Click the Color scheme drop-down arrow. Under the list of color schemes, check the Show names box.
  4. Scroll through the list of color schemes. Near the bottom, click Yellow-Orange-Red (5 Classes) to select it.

    By default, the data is grouped into five classes. The class breaks reflect value clusters in the data (natural breaks), but they aren't intuitive to a map reader. You'll change the class break values.

  5. In the lower part of the Symbology pane, on the Classes tab, edit the Upper value and Label columns as shown in the table below. Click twice to make a cell editable. Press Enter to commit an edit.

    Upper valueLabel

    2

    Less than 2%

    5

    2% - 5%

    10

    5% - 10%

    20

    10% - 20%

    Leave unchanged

    More than 20%

    Your Symbology pane should look like this:

    Symbology pane settings

    On the map, the Territorial Authorities layer reflects the new color scheme. The colors look faint because transparency was used on the original symbology.

  6. In the Contents pane, make sure the Territorial Authorities layer is selected. On the ribbon, under Feature Layer, click the Appearance tab. In the Effects group, move the transparency slider to 0%.
  7. In the Contents pane, turn off the Cities layer.

    Map with graduated color symbology

    At the moment, only one value is symbolized for each feature on the map. To see the data change year by year, you'll enable time on the layer.

  8. Click Save Save to save the project.

Enable time and visualize the data

The display of temporal data is controlled with a time slider that's similar to a video player. A contextual Time tab on the ribbon provides more settings for displaying the data. The time slider and ribbon tab become available when you enable a layer's time property.

  1. In the Contents pane, right-click the Territorial Authorities layer and click Properties Properties.
  2. On the Layer Properties dialog box, in the list on the left, click Time.
  3. Click the Layer Time drop-down arrow and click Each feature has a single time field.

    Time Field is automatically set to Year_Converted, and Time Extent is set to the range of the data.

    Layer Properties dialog box with time settings
  4. Click OK.

    The time slider appears at the top of the map view.

  5. Hover over the time slider to see its controls.
    Disabled time slider
  6. On the left side of the time slider, click the Enable time button Enable time.

    Time-enabled map

    The time span collapses to the first value in the range; in other words, the slider is now filtering the content displayed on the map. In 1997, Chinese tourists did not make up more than 2 percent of international visitors to any territory. Many territories have null values for that year, symbolized by the gray Background layer symbol.

    You'll configure the time slider to play back the data in one-year intervals.

  7. On the ribbon, under the contextual Map tab, click the Time tab. In the Snapping group, check the Time Snapping box. Under the check box, click the Time Snap Interval drop-down arrow and click Years.

    This setting corresponds to the resolution of the data, which was captured at yearly intervals.

  8. In the Current Time group, change the Span setting to 0 and press Enter.

    Time settings on ribbon

    This ensures that only one year's worth of data displays at a time. To learn more about configuring time, see Configure time slider settings.

  9. In the Playback group, click the Play All Steps button Play all steps.

    The map plays through the data, displaying the percentage of Chinese tourists in each year. In the last few years of playback, there is a noticeable increase—especially on the South Island.

    Tip:

    You can also play the data by clicking the Play All Steps button Play all steps on the time slider.

  10. In the Playback group, use the Adjust Playback Speed slider to decrease the speed. Play the data again.
  11. Click Save Save to save the project.

Create an animation and export a video (optional)

In this section, you'll create an animation of the playback and export it as a video file. This allows you to share your work with others, such as business owners and stakeholders in the tourism industry, who may not have access to ArcGIS Pro.

Animations are composed of keyframes, which are like stations or waypoints, and the transitions between them. Now that you have configured time properties for the Territorial Authorities layer, you can import the time slider steps (one step per year) to the animation. Each time step will become a keyframe. In this case, the animation is stationary—there's no camera movement—so there won't be any transitions to speak of. Learn more about animation.

  1. On the ribbon, click the View tab. In the Animation group, click Add Add Animation.

    An animation is created for the current map. The blank Animation Timeline pane appears under the map view. On the ribbon, under the contextual Map tab, the Animation tab appears.

    You'll make sure that the map is correctly zoomed to the data.

  2. On the ribbon, click the core Map tab (next to the Project tab). In the Navigate group, click Bookmarks Bookmarks and click the New Zealand bookmark.
  3. On the ribbon, under the contextual Map tab, click the Animation tab. In the Create group, click Import Import Animation and click Time Slider Steps Time Slider Steps.
    Drop-down list of items you can import

    The Animation Timeline pane populates with 22 keyframes. The first keyframe represents the animation at zero seconds (00:00.000). Each subsequent keyframe corresponds to the data for one year. (It may take a few moments for the thumbnail images to display in the keyframes.)

    Keyframes in Animation Timeline pane

    On the Animation tab, in the Create group, the default Append Time setting is 3 seconds. This is the time it takes for one keyframe to transition to another. With 21 transitions, your animation will be one minute and three seconds long. Since there is no camera movement, you don't need that much time between keyframes. You'll shorten the duration to make the video more visually effective.

    Note:

    In the map view, the left and right sides of the map may be clipped to conform to the aspect ratio of the animation.

  4. On the Animation tab, in the Playback group, replace the duration value with 00:21, and press Enter.

    The time stamps in the Animation Timeline pane are adjusted. Each transition now takes one second.

    It would be helpful if the animation showed which year the data represents. You'll add dynamic text to show this. Dynamic text displays information that updates during playback.

  5. In the Animation Timeline pane, under Keyframe Gallery, click the first keyframe to select it. Scroll to the end of the gallery, press Shift, and click the last keyframe.
    Selected keyframes

    The dynamic text you add in the next step will be applied to all the selected keyframes—in other words, throughout the animation.

  6. On the Animation tab, in the Overlay group, expand the Overlay gallery.
    Overlay gallery with expand arrow highlighted
    Note:

    Depending on the size of your ArcGIS Pro application window, you may see an Add Overlay button Add Overlay rather than gallery items. Click the button to display the gallery.

  7. In the Overlay gallery, under Dynamic Text, click Map Time.
    Expanded Overlay gallery

    A box with a dynamic text expression appears as an overlay on the map view.

  8. In the dynamic text box, replace the default expression with <dyn type="animation" property="startTime" format="yyyy"/>.

    Dynamic text expression

    The expression creates a single time label, rather than a start and end time, and formats it to display the year rather than a full date.

  9. On the map view overlay, click Close Close to commit your edits.

    You'll make the dynamic text larger. Then you'll preview the animation.

  10. In the Overlay group, change the font size to 48.
  11. On the Animation tab, in the Playback group, click Play Play. (Don't click the Play button on the time slider.)

    Animation keyframe during playback

    You're ready to export the animation as a video file.

    Tip:

    You can improve the animation with more overlays. For example, in the Overlay gallery, you could add an image Image of the layer legend and a text paragraph Paragraph Preset with additional explanation. To learn more, see Edit animation overlays.

  12. On the Animation tab, in the Export group, click Movie Export Movie.

    The Export Movie pane opens. The default settings output a video configured for YouTube in .mp4 media format. You can experiment with other movie export presets and settings if you like.

  13. In the Export Movie pane, next to File Name, click the Browse button Browse and browse to a folder where you want to save the video.
  14. In the Animation File Location browser, change the file name to Chinese Tourism NZ 1997 to 2017. Click Save.

    Export Movie pane

  15. Click Export.

    The export takes some time. You can track the progress at the bottom of the pane. When the process is finished, a Play the Video link appears in the lower left corner of the pane.

  16. Click Play the Video.
  17. Leave the Contents and Catalog panes open. Close any other panes.
  18. Click Save Save to save the project.

In this tutorial, you created a dynamic temporal visualization in ArcGIS Pro. You added an Excel worksheet to your project and ran geoprocessing tools to transpose and calculate fields. You joined the stand-alone output table to a feature layer, symbolized the layer, and configured its time settings. If you did the optional section, you imported the time steps as an animation and exported the animation as a video.

Dynamic displays can draw attention to important patterns. In this case, visualizing the Chinese tourist market in time and space can help business analysts see where significant changes are occurring and where new tourism efforts should be focused.

More sophisticated analysis of temporal data can be done with the tools in the Space Time Pattern Mining toolbox. For an advanced tutorial using temporal data analysis, see Analyzing traffic accidents in space and time.

Related topics