Performing data analysis
Two important operations that support data analysis are groupings and calculated, or aggregated, fields. Both operations help to distill a simple table with rows of data units into information from which we can draw conclusions, spot trends, and identify anomolies.
In the case of our my.upload.test.markets example, we have decided to leverage the geographical coordinates in the table to generate a heatmap graph that plots the intensity of activities on a world map. To do this, we will group the events in the table by latitude and longitude coordinate pairs and by time (in this case, in 1 hour periods). We will then calculate the total number of events per grouping in order to understand the volume of activity in each location and time.
Grouping the data
- Select the LatitudeFloat and LongitudeFloat column headers to select both columns.
- Click the Group icon on the toolbar.
- The Group By dialog box will open with the LatitudeFloat and LongitudeFloat arguments already selected as Arguments. Choose 1 hour from the Every dropdown list, then click the Group By button.
Your table now appears with just three columns; eventdate, LatutudeFloat, and LongitudeFloat. Next we want to know how many descrete events there are for each time and place group.
Counting events in a group
In this step we add a new column that displays the total number of events in each time and place group. This number is a calculation, or aggregation.
First, make sure that none of the columns are selected. Then, click Aggregate in the toolbar.
This will display the Aggregate Function dialog box. The default Aggregation type is count and the Column Name is count. Click the Aggregate Function button to add the new column.