This session, we’ll learn how to modify and stylize geospatial visualizations in Data Studio for insight and clarity.
We address the use of:
In particular, we focus on gradient, divergent, and discrete color palettes to convey quantitative data.
Recall from the previous session that our reports need a data source with the right variable type.
We learned how to:
A1:D50)You can review the previous session here.
For this session, we’ll need a variety of variable types.
We will use two open data profiles for Syracuse, New York. One is in CNY Vitals Pro the other is in Data USA:
Downloading Data from CNY Vitals Pro
Download tables from CNY Vitals’ location profile overviews by simply clicking “Download Data”.
Downloading Data from Data USA
Download tables from Data USA’s location profiles by clicking “View Data” and “Download as CSV”.
To make a copy of our practice data, first open each table below:
Once opened in Google Sheets:
File in the upper-left menu, then click Make a CopyFolder is set to “My Drive” and click “OK”Step 1: Select “Make a Copy”
To copy a table in Google Sheets, first click “File” and “Make a copy”.
Step 2: Verify Name & Destination
Make sure the file name and destination folder are okay, then click “OK”.
You should now have copies of Demographics in Syracuse and Global Diversity in Syracuse in G Drive.
Create a new report on the Google Data Studio homepage. Then:
Edit Connector interface, under Spreadsheet, click “Demographics in Syracuse”Options are checked and that no “Optional Range” is specifiedEdit Fields interfaceYou must repeat this process again for the “Global Diversity in Syracuse” G Sheet.
Recall that when we connect sources to Data Studio reports, we can edit field (variable) types.
Editing Field or Variable Types
Simply select a variable row under the “Type” column to modify its type, e.g. “Text” or “Date”.
Editing Types: We’re using many variable types, so make sure the following are specified correctly:
Global Diversity in Syracuse fields and types:
Adding Additional Data Sources: To connect another data source or edit one you’re using, simply:
Resource in the upper menuManage added data sourcesAdding New or Editing Current Data Sources
You can always add new sources, remove old sources, and edit current sources for your reports.
Demographics in Syracuse fields and types:
Finally, click “Add to Report”. You now have two different data sources feeding into your dashboard!
When in edit mode (versus view mode), without anything selected, we may modify our layout and theme.
Modifying Your Report Layout
The layout of your report dictates its canvas size, grid resolution, and even menu behavior.
The following layout options correspond to the above image and include the:
Headers not only contain your title, but have higher-level report functions, including options to:
The Report Header
Use the header for high-level functions typical of Google apps.
Depending on your audience, you may want your header to behave differently.
Hidden Headers
Hiding your header can make your report all the crisper, but users may not know how to access it.
Navigation options are important when your report covers different topics that are separable by pages.
Left Position “Nav Bars”
Left position navigation, or “Side Navs”, are intuitive and show full page names right off the bat.
Top Position “Nav Bars”
Top position navigation in Data Studio is more compact and less intrusive, but is less intuitive overall.
Key Takeaway: Consider your audience when deciding how you want the layout to appear and behave.
Pro Tip: Sometimes, page names may be used to guide users like a conversion funnel.
Themes involve “global” style options and default settings are usually fine. Why modify them?
Setting “Simple” Themes for Daytime Modes
Daytime modes are less susceptible to glare and make the data pop by eliminating visual competition.
Setting “Simple Dark” Themes for Nighttime Modes
Nighttime modes are critical for both anxiety-ridden insomniacs and troglodytes, such as myself.
Try muting or limiting the use of blue light if you like to fall asleep while perusing data.
Key Takeaway: There’s a decent amount to cover here, potentially, but best practices in data visualization will be peppered throughout these sessions and are very much applicable in themes.
There are several kinds of visualizations you can use in your reports.
Remember: Data visualization is all about communicating a (usually big) idea.
Geo Maps represent a family of geospatial visualizations that change according to data type.
Note: Data Studio uses “Regions” and “Region Codes” as the type for U.S. states.
Read More:** You can read more about geo maps using on Google’s “Geo Map Reference” guide.
Choropleth Maps are geospatial visualizations that use shapefiles, or polygons of geographic areas.
Choropleth Map of ProLiteracy Membership by State, 2017
Chropleth maps have darker, or more saturated, areas that indicate larger quantities. What’s the story here?
How do I make a choropleth map? The following steps summarize how to make a map, or use the images below.
Insert in the upper-left menu and select “Geo Map”Dimension, either coordinates, places, or geographic areasMetric, the quantitative data that affects color saturationDate Range Dimension, which allows us to filter by “Year”Step 1: Select Chart Type “Geo Map”
Select “Insert” in the menu and “Geo map” in the dropdown.
Step 2: Place Your Geo Map
Simply click-and-drag to place your visualization.
Step 3: Ensure the Correct Data Source
Since we now have two data sources, make sure you’re using the correct one.
Step 4: Select a Location-Related Variable for “Dimension”
Variables may include coordinates, places (e.g. cities), regions, states, countries, and continents.
Step 5: Select a Quantitative Variable for “Metric”
The variable in the “Metric” field is contains the quantitative data to visualize.
Step 6: Select a Date & Time Variable for “Date Range Dimension”
By including a time dimension, we’re able to filter the data visualized for better insights.
Step 7: Resize the Map Appropriately
The corners and sides for every visualization are adjustable via click-and-drag.
Data Ink options may be considered any options in the Data tab when we’ve selected our geo map.
Metrics allows us to rename, transform, and change display formatsDimension allows users to highlight a geographic areaFilter applies custom filters to data using logical operators (e.g. >, <) and regular expressionsRename, Transform, and Reformat Variables in “Metric” Field
“Sum” provides the quantitative total for each country, whereas “Count” provides total appearances, e.g.
Customize “Default Date Range”
Show users a particular year, date, time, or range over time by default.
Highlight Select Areas by Enabling “Drill Down”
By enabling “Drill Down”, users can click on an area to highlight it and mute all other areas.
Create Custom Filters to Control Data for a Single Graphic
Select “Add a Filter” to select a premade filter or make a new one with “Create a Filter”.
Customize Filters with Multple Conditions
A single filter contain multiple clauses, or conditions, using logical operators and “regex”.
Custom Filters Only Affect the Visualizations to Which They Are Applied
Filtering the data down to a single year, for example, greatly reduces the range of quantities.
Color Palettes require some consideration and should not be used haphazardly. Consider the kinds of palettes:
Gradient Color Palettes take a single color palette and use varying levels of saturation to convey quantity.
Selecting Your Gradient Color
*Simply click on the “Style” tab and adjust the “Max Color Palette” color to your heart’s content.
Blue Gradient Color Palettes
Blues are all around nice, sharp color palettes and actually create a sense of alertness.
Green Gradiant Color Palettes
Shades of green allow the greatest differentiation in saturation, hence why green is used for night vision.
However, green gradient palettes are difficult to discern for colorblind audiences.
Color Choice Literally Means Nothing - You’ve Been Had!
Seriously. We’re talking about saturation, here, and convey insight perfectly in a printer-friendly black and white.
Key Takeaway: For gradiant color palettes, we’re relying on a convention.
Divergent Color Palettes do not rely on saturation, but the transition from one color to another.
For the sake of demonstration, we’ll use the same data to show divergence. Let’s pretend.
A Colorblind-Friendly Divergent Scale
Divergence from yellow to purple is inspired by the Viridis color palette and universally applicable for divergence.
The “Viridis” Gradiants Excel in Consumer-Friendly Divergence Palettes
“Viridis” palettes emerged in the Python language and quickly entered currency in other graphics packages.
Source: “The Viridis Palette for R” (Thinking on Data, 2018)
Green & Red: Divergent Palettes that Leverage Conventions
Leveraging conventions, such as “Green” for profit and “Red” for loss, helps audiences interpret your ideas.
Making a Custom Divergent Palette
Open the “Style” tab to choose “Max”, “Mid”, and “Min” color values using premade colors.
Color Customization with “Hex” (Hexadecimal) Codes
When expanding the color options, select “Custom” to customize a “hex” code.
Descrete Palettes are precisely that - discretized or categorical color values that ar not gradiant.
Red v. Blue States, 2018 Midterms
We just used a well-known color convention to learn about discrete color palettes.
Source: Silver, Nate (2018). “The 2018 Map Looked a Lot Like 2012”. FiveThirtyEight.
Extract Colors from Images: There are some nifty tricks to picking a color from an image, like a company logo.
Extract Colors Directly from Images for a Perfect Match
This is useful not only for logos, but color psychology and matching centerpiece images, too.
Generate Gradient & Discrete Color Palettes automatically using a site like Coolers.
With Coolers, you can lock-in a single color and generate gradients or cycle through, ehem, palatable schemes.
Ensure Accessible Colors using sites like WebAIM to ensure font and background colors, e.g., are accessible.
Color contrast checkers ensure that people can easily read your font.