9. Interactive Visualization with Tableau

Topics and Notes
  1. Register an account with Tableau Public and install Tableau Public Desktop on your machine.
  2. Basic Statistical Charts in Tableau
    • a. Bar chart, pie chart, donut chart
    • b. Histogram and density curves
    • c. Time series plot (line plot)
    • d. Scatter plot and buble plot
    • e. Maps and tree maps
  3. Derived variables and Tableau built-in functions
  4. Filters
  5. A Brief Note on Basic Statistical Charts with Tableau HTML RMD SOURCE
Assignments
Recreate the presidential election map using Tableau.
  1. Data sets: Presidential Election 2000-2020
  2. Data management: Create two subsets - county and state level elections results
    • a. County-level Data
      • (1). Calculate the percentage of each participating party within each county.
      • (2). Keep only the winning party in the data set
    • b. State-level Data
      • (1). Calculate the percentage of each participating party within each state.
      • (2). Keep only the winning party in the data set
    • Hint: Each county has a unique record for county-level data (there are about 3200 counties in the US). Similarly, in the state-level data set, each state has only one record.
  3. Submission Requirements
    • a. [Required] Create an interactive choropleth map to display the presidential election results at the county level using two different colors to represent the two major parties.
      • (1). The map title must be descriptive and aligned appropriately with other visual objects using visual design principles
      • (2). The hover text should contain year, state, county, the name of the winning party, winner's name, votes received, and percentage of the total votes.
      • (3). Set a filter using an appropriate variable.
      • (4). Set a filter using year
      • (5). Steps for making a map using county FIPS can be found at Web Link
    • b. [Optional but encouraged] Create an interactive choropleth map to display the presidential election results at the state level using two different colors to represent the two major parties.
      • (1). The map title must be descriptive and aligned appropriately based using visual design principles
      • (2). The hover text should contain year, state, winning party, votes received, and percentage of the total votes.
      • (3). Set a filter using year
    • c. After finishing the Tableau map, you save it to the Tableau Public Server (need to sign into your account).
    • d. Write an RMD document using my suggested YAML and CSS that contains the following components (sections).
      • (1). an introduction to the data set and what your plan to visualize
      • (2). A description of your data management process.
      • (3). Use Tableau-generated embedding code to embed your interactive maps in the RMD (keep in mind, that you need a single-cell HTML table).
      • (4). Storytelling.
    Assignment Due: Wednesday, 11:30 PM

Copyright © 2019- C. Peng. Last updated: