Approximate Reading time: 6 minutes
ArcGIS Pro Release: 3.4
One of the most commonly used tools in ArcGIS Pro is Summary Statistics. It calculates the statistics (sum, mean, etc.) of attribute fields from an input dataset, and creates an output table with the summarized values. And you can group those statistics based on unique values from a specified Case Field.
Summary Statistics Updates in Pro 3.4
As an early gift from us to you, the Summary Statistics tool just got a little better and a lot faster with two enhancements:
- Mode–This new statistic can be selected to calculate the most common value in a field.
Note: The Unsplit Line, Dissolve, and Pairwise Dissolve tools were also updated with the mode statistic in Pro 3.4. - DBMS statistic types–Use a DBMS statistic type for faster calculations when summarizing data from remote databases.
What is a DBMS Statistic?
A Database Management System, or DBMS, in ArcGIS Pro is an umbrella term for the systems used to store, manage, and retrieve spatial and nonspatial data from a database.
Learn more about supported databases in ArcGIS Pro.
Traditionally, when you run a geoprocessing tool with input data stored in an enterprise geodatabase or feature service, all the dataset records must be sent from the database to the computer running Pro. This is called client-side processing, and it can be time-consuming depending on the data’s size and the network speed.
In recent versions of Pro, several geoprocessing tools like Calculate Field, Select Layer By Attribute, and others were enhanced to use DBMS computations when the input is stored in a database. Now in Pro 3.4, the Summary Statistics tool has been similarly enhanced. By choosing a DBMS Statistic Type your summarizations will be processed directly in the database, saving you time since no data transfer is required.
Note: Because these new calculations are done using database queries, the results may be slightly different due to differences in the database provider.
Use DBMS Statistics for Faster Performance
To compare the performance between the DBMS and the client-side statistics, let’s find the maximum recorded earthquake magnitude since 1900.
The Earthquakes Archive from the ArcGIS Living Atlas contains all earthquakes with a magnitude over 4.0 from 1900 to the present day. This dataset is updated once a day and has nearly half a million records (accessed Nov. 11, 2024).
On the Geoprocessing pane, open the Summary Statistics tool and set the following parameters:
- Input Table:
https://services9.arcgis.com/RHVPKKiFTONKtxq3/arcgis/rest/services/Historical_Quakes/FeatureServer/0
- Output Table: specify a name and location
- Statistics Field:
Event Magnitude
;DBMS Maximum
Note: DBMS and client-side statistics cannot be processed at the same time. Run the tool multiple times if you need both traditional and DMBS statistics calculated. You can join your results together using Join Field. - Run the tool.
- Change the Statistic Type to
MAX
and the output table name. Then Run the tool again.
Notice that the DBMS_MAX
is over 70 times faster than the client-side Max
!
Example: Summarize Weather Data using DBMS statistics
As the holidays approach, temperatures drop, and vacations are planned, you may want to keep an eye on the weather reports. Whether you’re hoping for snowfall or wondering if a winter storm will delay your travel plans, weather data is here to keep you in the know!
The ArcGIS Living Atlas has a NOAA weather report dataset with continuously updated storm reports for the past week. The dataset is updated every 15 minutes and is filtered to display data from the past 24 hours.
Let’s summarize the weather data to find out where snow has been reported and get the average magnitude of the snow events. And since this dataset is updated every 15 minutes, let’s also schedule the tool to get new results over time.
Schedule a geoprocessing tool
In the Summary Statistics tool, set the following parameters:
- Input Table:
https://services9.arcgis.com/RHVPKKiFTONKtxq3/arcgis/rest/services/NOAA_storm_reports_v1/FeatureServer/4
Note: Its recommended to use the full data path instead of the layer as an input for scheduled processes to ensure the tool runs regardless of the project availability. But this means the filter will not be used in the input; so instead, the tool will calculate statistics for the entire week. - Output Table:
Storm_Report_by_State_%t%
Note: The time stamp variable,%t%
, is added to the output name to create a new output each time the tool runs with the tool run time in the output name. - Statistic Fields:
MAGNITUDE
;DBMS Mean
- Case Field:
STATE
;INCIDENT_TYPE
- Open the Run button split menu and select the Schedule button to open the Schedule dialog box.
Note: You may see a warning next to the schedule button reminding you to save the project. If you had used a layer as an input to the tool, saving the project would be essential because the schedule is referencing the layer through the project file (.aprx). But by using the full data path as an input, we ensured that the schedule could access the dataset directly without relying on its layer connection in the project.
On the Schedule dialog box, set the following properties:
- Task Name:
Storm_Report_Statistics
- Recurrence:
Weekly
This results in a new output table each week with the average magnitude of the weather events that have occurred in each state.
The scheduled tool’s output is available in the specified save location.
Open the output attribute table to view the average magnitude of the weather events each week.
To view only the snow events, click the Select by Attributes button to and set the Expression to INCIDENT_TYPE = 'Snow'
.
Summary
In ArcGIS Pro 3.4, the Summary Statistics tool was updated with several new statistic types including Mode and DBMS statistics for making calculations from remote databases faster. This blog showed how to use DBMS statistics with dynamic data from the ArcGIS Living Atlas, and how to schedule the Summary Statistics tool to get updated results at recurring intervals.
To see what else is new in ArcGIS Pro 3.4, please visit the What’s New documentation and post your questions in the ArcGIS Pro board in the Esri Community.
Have a happy holidays!!
Article Discussion: