In this post, I’ll show you how you can create segments without manually writing expressions.
Segmentation is a core activity in many visualization and analytics exercises, so making it easier is essential to being more productive. In Arcadia, you can create segments following these steps. This way, you manually enter the expressions in the Filters field in the Add Segment window. Alternatively, you can use the following trick to create a segment by saving a filter as a segment.
Dataset
We are working with the dataset SFPD Reported Incidents Since 2014 [data source]. The data shows the categorized number of incidents reported by the San Francisco Police Department in the year 2013. We will create four segments Q1, Q2, Q3 and Q4 for the year 2010.
Save Filters as Segments
The following steps demonstrate how to save filters as segments:
- Create a New Visual.
- Under Measures, select date and drag it over Filters shelf on the main part of the screen. Drop to add it to the shelf.
- On the Filters shelf, on the date field, click the down arrow icon, select Pick values from a list.
The Pick values for date window appears. - From the list, select the dates ranging from January through March.
- Click Save.
The selected dates appear on the Filters shelf. - Find the Save icon in front of the Filters shelf.
Hover mouse or pointer over it. A tooltip appears showing Save as segment.
- Click the Save as segment icon.
- On the drop-down window that appears, click Create a new segment.
The Add Segment window appears.
Note that the window has the selected dates already entered in the Filters field. - Make the following changes to the Add Segment fields.
- Write
Q1
in Segment Name field. - Write 2010 in the Segment Group field.
- Write
- Click Save
- Repeat steps 1 through 10 to create the segments
Q2
,Q3
, andQ4
. FindQ1
,Q2
,Q3
andQ4
under Segments in the left navigation menu.
- Now, you can represent your segments in the visual with dimensions, colors, and so on.