Creating Good Graphics

Grammar of Graphics Review

How do we describe this plot using the grammar?

  • X mapping: time
  • Y mapping: utilities cost
  • color mapping: continent
  • fill mapping: flag
  • geoms: line, point
  • coordinate system: Cartesian

Grammar of Graphics Review

How do we describe this plot using the grammar?

  • X mapping: Political spectrum
  • Y mapping: Average number of children
  • color mapping: Timespan
  • label mapping: Timespan
  • geoms: Line
  • coordinate system: Cartesian
  • facet: Location

Good Graphics Review

What problems do you notice in this chart?

What would you fix?

Grammar of Graphics Review

A stacked bar chart titled GDP Growth (HoH Annualized) showing AI investment (striped) and all other investment (solid), with a line showing total gdp growth. The y-axis goes from -1% to 7%, and the x-axis shows 2021H1, 2022 H1, 2023H1, ..., 2025H1 (presumably first and second halves of the year, with the first half labeled). In 2021, AI investment is highest, and in 2022, the total GDP growth was slightly negative, with AI investment nearly balancing out the rest of the economy. AI investment has been relatively small (.33%ish) through the other halves until 2025, when it registered as maybe .5%.

Plot source (screenshots from the video)

How do we describe this plot using the grammar?

  • X mapping: time
  • Y mapping: GDP growth
  • fill mapping: Economic sector
  • geoms: Bar, Line
  • position: Stacked, Identity
  • coordinate system: Cartesian

Grammar of Graphics Review

Two stacked bar charts showing ADP and nonfarm payroll growth, with the x-axis showing time (monthly) and the y-axis showing growth in thousands. ADP payroll growth is shown for June, July, August, Sept, while nonfarm payroll growth is shown for May, June, July, August. ADP payroll growth is shown by firm size, with an increase in July. The overall trend is shown with a black line, and the average is slightly negative in June (-25k) and Sept (-25k), but positive in July (~100k) and at 0 in August. The Nonfarm payrolls growth is shown by sector, with government, education and helath, leisure and hospitality, and other categories. A black line shows overall growth, and is slightly positive in May, slightly negative in June, very positive (about 75k) in July, and slightly positive (20k) in August.

Plot source (screenshots from the video)

How do we describe this plot using the grammar?

  • X mapping: time
  • Y mapping: Payroll growth
  • fill mapping: Firm size (ADP payroll), Economic sector (Nonfarm payroll)
  • geoms: Bar, Line
  • position: Stacked, Identity
  • coordinate system: Cartesian

Good Graphics Review

Two stacked bar charts showing ADP and nonfarm payroll growth, with the x-axis showing time (monthly) and the y-axis showing growth in thousands. ADP payroll growth is shown for June, July, August, Sept, while nonfarm payroll growth is shown for May, June, July, August. ADP payroll growth is shown by firm size, with an increase in July. The overall trend is shown with a black line, and the average is slightly negative in June (-25k) and Sept (-25k), but positive in July (~100k) and at 0 in August. The Nonfarm payrolls growth is shown by sector, with government, education and helath, leisure and hospitality, and other categories. A black line shows overall growth, and is slightly positive in May, slightly negative in June, very positive (about 75k) in July, and slightly positive (20k) in August.

Plot source (screenshots from the video)

What problems do you notice in this chart?

What would you fix?