GEOG 486
Cartography and Visualization

Lesson 9 Lab Visual Guide Part I


Lesson 9 Lab Visual Guide Part I

In Part 1, follow these steps to create the example, Tableau Story.

  1. Introduction to Tableau
  2. Starting in Tableau
  3. Symbolize your Map
  4. Create a Graph/Chart
  5. Create your First Dashboard
  6. Create a Tableau Story

  1. Introduction to Tableau

    In this lab, we will design an interactive geovisualization with Tableau. The final result will be a Tableau Story similar to the one about Airbnb data in Portland we discussed in Lesson 9.

    To begin, open the Age_andSex_AFF_ACS_2017 Excel file. This file has multiple fields (columns) of data for each state in the United States. It was created by making minor edits to a CSV file downloaded from the US Census Bureau's American Community Survey (ACS). If you're not sure what data to use for your own project, the ACS is a good place to start.

    The most important component of this Excel sheet is the State column—Tableau will automatically recognize and map several geographies, such as States, Countries, Zipcodes, and Coordinates (lat/long). You may choose to map another geography (e.g., counties, census tracts, block groups) for your own Lab, but using one of these geographies is more advanced and will not be covered here.

    screen capture of Lab 9 starting Excel file, see link above
    Visual Guide Figure 9.1. Lab 9 Tutorial Starting Excel file.
  2. Starting in Tableau

    Open Tableau Desktop and Connect to the Excel File (Figure 9.2.). The file has already been formatted properly for import. If you like, you can select "Extract" to extract the data. If not, you will be prompted to do so later, before publishing your Story online.
    Select Sheet 1 at the bottom of the page to open a Tableau worksheet.

    screen capture showing opening Tableau and connecting to an Excel File.
    Visual Guide Figure 9.2. Opening Tableau and connecting to an Excel File.

    Before continuing, save your file as a Tableau Workbook file (the default file type). As with projects in ArcGIS Pro, you should regularly save as your work.

    You should now see a screen similar to the one in Figure 9.3. State should be listed among your tables, and your measures should list the many fields of data that were included in your Excel file.

    The distinction between table and measures in Tableau is important. A table is an element, such as a state, year, company, etc. that you are interested in viewing data about. A measure is that data, such as % insured, or a number of products sold. For geographic data, a table is always the geographic unit (e.g., state, country) and a measure is the data to be mapped. Tableau often correctly identifies the table and measures in your data, though occasionally you may have to convert one to the other. In this example, all measures and tables were correctly identified.

    screen capture of blank worksheet in Tableau
    Visual Guide Figure 9.3. The start of a Worksheet in Tableau Desktop.

    Now it's time to make your first map! Click and drag the State table into the middle of your worksheet (Figure 9.4). Tableau will automatically recognize this geography and create a map.

    screen capture of creating a map from a Geography dimension in Tableau desktop
    Visual Guide Figure 9.4. Creating a map from a Geography table in Tableau Desktop.
  3. Symbolize your Map

    Drag a measure of interest onto an appropriate visual variable in the Marks section (Figure 9.5). In this example, “Percent Female; Estimate; AGE 85 years and over” is dragged to the Color box. You might choose another mark (symbol) type such as size if you were mapping count values (such as the TOTAL number of 85+ yr old females, rather than the rate).

    screen capture of creating a simple map in Tableau
    Visual Guide Figure 9.5. Creating a simple map in Tableau.

    Select “Edit Colors” to choose a different color palette – remember to choose a color progression appropriate for the progression of your data! You can use the “advanced” menu to make further edits.

    screen capture: editing colors
    Visual Guide Figure 9.6. Editing a color scheme in Tableau.
  4. Create a Graph/Chart

    Recall that the focus of this lab is to create an interactive map/dashboard with coordinated views. Here, we create a bar chart with the same data as our map. The intent of this is to show the same data in two different ways. Eventually, we will connect the map and graph so that the user can explore one via the other.

    To create a graph, first, create a new worksheet. Then drag one measure (e.g., “Percent Female; Estimate; AGE 85 years and over”) and one table (here, "State") to Columns and Rows section. It doesn't matter which is which - switching them will simply change the orientation of your graph.

    screen capture: creating a bar graph in Tableau
    Visual Guide Figure 9.7. Creating a bar graph in Tableau.

    You may notice that when you add your measure (here, % female 85+) to a graph/chart/map in Tableau, the default measurement is SUM (see Figure 9.7). Since in our data we have only one value per state, the sum is equivalent to the original value. Thus, changing this is not necessary. If you had an Excel file with multiple rows for each state, Tableau would sum those values and display that calculated value - you may, in that case, want to display the average in each state instead. You can change how your measures are calculated by clicking on the colored green oval "pill" of the measure you want to change.

    Once we've created a graph, it's time to add color! Drag the same data measure from the sidebar to the Color box in the Marks section to color your bars according to that data—as the length of the bar already represents this value, adding color here is called dual encoding. Edit your color scheme so that it matches the one from your map. Your color schemes (map and graph) should be equivalent, as we are only going to create one legend for our dashboard.

    The last step before adding our visualizations to a dashboard is to clean up their design. Add chart/map titles (if you wish), shorten and clarify axis labels, and simplify tooltips (Figure 9.8). Adjust font size and style as appropriate.

    screen capture: editing tooltips in Tableau
    Visual Guide Figure 9.8. Editing tooltips in Tableau.
  5. Create your First Dashboard

    Click the "New Dashboard" icon at the bottom of the screen (Figure 9.9) to create a Tableau Dashboard. This is what we will use to connect our map and graph. Drag your two worksheets onto the dashboard and re-arrange as you wish. Experiment with different arrangements of elements (e.g., map, graph, legend) on the dashboard.

    screen capture: creating a new dashboard in Tableau
    Visual Guide Figure 9.9. Creating a new dashboard in Tableau.

    Note: I have increased the size of my dashboard for demo purposes - you will likely want to use a standard size, and these are listed in the Size dropdown menu. The size of your dashboard on your screen vs. on the web will depend on the resolution of your laptop screen. It may take a bit of trial and error to get yours to appear the correct size.

    screen capture: example Tableau dashboard
    Visual Guide Figure 9.10. An example Tableau dashboard.

    You can use the Objects menu (bottom left) to add other elements, such as images, text, and blank layout elements to your dashboard. In Figure 9.10, a text object was used to add explanatory text, and an empty object was used to insert a margin above the legend.

    To connect your map and graph, use the Actions menu (Figure 9.11). Here, Highlight is used to connect your map and graph upon user selection of an element on either. This is the default action if you do not customize anything, but you are welcome to use a different action or actions if you choose.

    screen capture: creating and adding an action to a Tableau dashboard
    Visual Guide Figure 9.11. Creating and adding an action to a Tableau dashboard.

    Your graph and map should now be connected! Example connection upon user interaction shown in Figure 9.12.

    screen capture: a demonstration of dashboard connectivity
    Visual Guide Figure 9.12. A demonstration of dashboard connectivity.

    Once this is complete, create two more worksheets (one map; one graph) for another measure (I chose % Males 85+). When this is complete, you will have two similar dashboards that visualize your two chosen variables (e.g., % Females 85+, % Males 85+). You may choose to use the same legend and color scheme for both dashboards or switch it up – just keep in mind design principles from this course.

  6. Create a Tableau Story

    Select "New Story" at the bottom of the page to create a Tableau Story. While Tableau dashboards can contain multiple worksheets, Tableau stories can contain multiple dashboards.

    Here, we create simple Story: Drag your first dashboard to the center of your new Story, then add a New Blank Story point. Use that new Story point to add your 2nd dashboard. Add an overall Story title and Story point titles (shown in the clickable grey boxes) as you wish.

    screen capture - creating a Tableau Story using the two dashboards
    Visual Guide Figure 9.13. Creating a Tableau Story using the two dashboards.

    Once you're happy with your Story design, you're ready to publish to Tableau Public. Make sure you've saved your work first! You will need to sign into (or create) your Tableau Public account before you can publish your work.

    To publish to Tableau Public, use the menu structure to go to Server -> Tableau Public -> Save to Tableau Public (Figure 9.14). If you make changes to your Story, you can "re-publish" it at any time to update the online version.

    screen capture: publishing to Tableau Public
    Visual Guide Figure 9.14. Publishing to Tableau Public.

    When publishing your Story, you may be presented with a notice that a Data Extract is required (Figure 9.15). If so, simply select Create Data Extract in the window, and save the extracted data as suggested. Then repeat the above steps (Figure 9.14) to publish.

    screen capture: Data Extract Required message from Tableau
    Visual Guide Figure 9.15. Data Extract Required message from Tableau.

    This example can be found here: Aging in the United States, a Tableau Story by Cary Anderson. Use this link to check and see how your results from this visual guide/tutorial compare! If you do not see the "Create Data Extract" option as shown in Figure 9.15, then look at this link to a help page with steps on how to do it. About midway down the webpage is the "Create an extract" section and it worked to publish part 1.

Credit for all screenshots is to Cary Anderson, Penn State University. Screenshots from Tableau Desktop, data source: US Census Bureau, the American Community Survey.