This session, we’ll learn advanced filtering techniques in Google Data Studio.
Filtering is the “process of choosing a smaller part of your data set” to view or analyze (Facer, 2018).
In short, we’ll explore the following filtering techniques:
Our practice data will be comprised of quantitative, qualitative, datetime, and geospatial variables.
Motivating Example: Filtering with Date Ranges
You may want to view specific data from a certain time period. Pictured above is a user-controlled date range filter.
Last session, we explored the following techniques:
You can view the last session script here, as well as all session scripts here.
Using Data Tables & Transformations to Create Sophisticated Reports
Nearly every datum pictured above is comprised of a table with transformed variables.
This session, we’ll use practice data from the NYS Office of Parks, Recreation, and Historic Preservation.
Our practice datasets include data on state parks in Central New York:
These datasets have been combined into a single document for convenience. View preprocessing tasks here.
Dataset variables or fields include the following:
Year: Year when cumulative park attendance was recordedFacility: Name of the state parkCategory: Indicates whether record is a state park, historic site, or marine facilityRegion: Region ID per Office of Parks, Recreation, and Historic PreservationCounty: New York State County nameAttendance: Cumulative attendance for Facility in YearGolf: Indicates golfing facilitiesCamp: Indicates camping facilitiesPlayground: Indicates playground facilitiesFacility URL: State park website addressLongitude: Longitudinal value of state park locationLatitude: Latitudinal value of state park locationLocation: Paired Latitude and Longitude coordinates of park locationLevels designate the “scope” of each element in your report. There are three main levels:
To make an element Report-Level in Data Studio:
Notably, visual elements exist in the same place on every page in your report.
Alternatively, report-level filter controls will affect all data in your report.
Designating Text as Report-Level
Report-level visual elements will exist in the same place and in the same format on every page.
Observe:
“Report Page 1” & “Report Page 2” Featuring the Same Report-Level Header
Regardless of page, visual elements remain in the same position and format.
Not all Report-Level elements are desireable on every page.
This is especially true for Filters. In this case:
Hiding a Report-Level Filter with a White Rectangle
Since report-level filters appear on every page, you may want a page without it. Here’s how!
Demonstration: The Global Literacy Assessment Dashboard (GLAD) features a number of Page-Level Filters, while the first two pages feature a Report-Level Filter. This report-level element is hidden on the “Glossary of Terms” and “Contributors” page by using this technique.
By default, visual elements and filters are set to Page-Level.
Page-Level Filters only filter data visualized in charts and organized in tables on the page where it’s placed.
Page-Level Visual Elements like images and shapes are also page-specific and will not appear on other pages.
To ensure an element is Page-Level in Data Studio:
Designating Text as Page-Level
Designating an element as page-level ensures it may only be found, or affect filtering, on that page.
Chart-Level designations are reserved specifically for data tables and visualizations.
To create a Chart-Level Filter, you must:
We’ll explore how to filter based on specified conditions below.
Note: Chart-level filters may be used more than once in the Filter Picker menu.
Selecting “Add New Filter” in the “Data” Tab
Simply click “Add New Filter” to create a filter specific to that chart.
The “Create Filter” Interface
You can specify up to 75 filtering conditions at the chart-level.
Date Range Filters are simple to implement and use, and my be applied at Report-, Page-, and Chart-Level.
Make sure you select the right control in the “Insert” dropdown from the main menu!
Inserting a Date Range Filter
Simply click “Date range” from the “Insert” menu and select where to place your control.
Designating a Variable as the “Date Range Dimension”
Click-and-drag your datetime variable in the “Date Range Dimension” to filter by date.
Selecting Date Ranges by Date (e.g. January 1, 2008 - December 31, 2014)
Use a “Date Range” filter if your datetime variable contains months and days.
Selecting Date Ranges by Units of Time (e.g. 2013-2018)
If selecting units of time, filter date ranges using a standard “Filter Control”.
You can visit Google Data Studio’s Help Documentation to learn more about the nuances of Rate Range Filters.
Filter Controls allow your audience to define their own filtering parameters.
To create a Filter Control:
Selecting “Filter Control” from the “Insert” Dropdown
Simply click “Insert” and select “Filter Control” to insert a user-controlled filter.
A Searchable, “Fixed Size” Filter Control
“Fixed Size” filter controls create a scrollable list that always remains open.
A Searchable, “Pop-Up Menu” Filter Conrol
“Pop-Up Menu” filter controls provide more real estate in your report and help the signal-to-noise ratio.
Rather than choosing from a List Filter of categories, Search All Filters search data for patterns.
This will modify your filter to Search All. These allow you to search by:
Comparison of “List” and “Search All” Options in the “Style” Tab
The option to change from “List” (checkboxes) to “Search All” (written fields) is in the “Style” tab.
A “Search All” Filter Control with Available Options
*“Search All” filters aren’t immediately intuitive to many users, but they’re very powerful when used properly.
You can visit Google Data Studio’s Help Documentation to learn more about the nuances of Filter Controls. Specifically:
Chart-Level Filters include or exclude data for a single table or chart based on your conditions, not end users.
Note: More than one chart-level filter may be applied to a single chart or table.
Selecting “Add a Filter” in the “Filter” Section of the “Data” Tab
Not only can you create new filters in this section, applied filters will be displayed here, too.
Creating & Editing a New Filter
This filter has a single conditional clause that’s inclusive of all state parks located in Onondaga County.
Creating Filters with Multiple Conditions
With the “And” and “Or” options, you can create extremely sophisticated filters with multiple conditional clauses.
Conditional Statements are also called Logical Statements, as each record must be evaluated as True or False.
Qualitative Variables will have operators that relate to sets (e.g. “In”) or pattern matching (e.g. “Contains”).
Quantitative Variables will have comparators like “Greater Than” (>), “Less Than” (<), etc.
Note: These may be as simple or sophisticated as you choose!
Overview: A report has been prepared for you using the NYS OPRHP’s State Park Attendance Data.
The “State Parks in Central New York” Practice Dashboard
The upper-left corner has been reserved for creating and placing new filters.
Instructions: Create the filters based on the specifications below and place them in the designated areas.