1a   Tableau   US covid cases bar chart with 7-day moving average line @pinotrogu
1a   Tableau   US covid cases bar chart with 7-day moving average line  @pinotrogu
Uploaded February 2021 | Updated November 2024, 2 years ago
The dataset -- us.csv -- if from NYT's GitHub repository:
github.com/nytimes/covid-19-data.
The NYT coronavirus page:
nytimes.com/interactive/2020/us/coronavirus-us-cases.html
This video shows how to generate the bar chart (one bar for each day) and then overlap the thicker line on top of the bars. The line shows the "7-day moving average" so it's smoother and gives a better trend view of the pandemic. The bars are good to see each individual day but because these can vary by a lot, they are better than a line which would look very jagged.
Note: the NYT file includes "cumulative" data, so each day shows the total since the pandemic started; it adds the current day number to the previous total. This means that the default bar/line will be always going up. Instead, we want to display the "daily" count (how many new cases in that particular day). In Tableau I show how to do this with a "calculation" without changing the original file. We duplicate the bars, change them to line; and this time apply two calculations, the subtraction and the 7-day average (although for some reason in the reverse order). These steps are the same for number 2, 3, and 4 videos.
1a   Tableau   US covid cases bar chart with 7-day moving average lineClothespin isometric with drafting toolsClothespin orthographic with drafting toolsMilk carton isometric with drafting trianglesMilk carton orthographic & sections with drafting trianglesClean & format graphs (paper)Clean up & format graphs (screen)Draw ellipses & cylinders intersecting cubesDraw cube with cutsGenerate GraphsInformation Design: Data Visualization   IntroductionDrawing, Drafting, and Sketching   Teachers Introduction
Pino Trogu |

1a -- Tableau -- US covid cases bar chart with 7-day moving average line

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER