We’re all topsy-turvey this week turning line charts on their side! ⇩
This weeks challenge was inspired by Nick Desbarats article Are Vertical Line Charts Ever a Good Idea?
Can you find some other examples where vertical line charts may be a good idea?
⋟^◕ܫ◕^⋞ Happy Vizzing
- Obtain the voteview_polarization_data.csv dataset from Voteview | Polarization in Congress
- Save locally
- From Power BI Desktop, get data from step 2
- Select chamber, congress, year, rep.mean.d1, dem.mean.d1 fields and remove all others
- Unpivot rep.mean.d1, dem.mean.d1 fields
Power BI Desktop
- Import Plotly.JS Custom Visual found in AppSource
- Place fields in Field Well
- From the ellipsis of the custom visual header, select edit visual
- Add Area Trace
- Add Transform, Split By, then split by category (Republican/Democrat)
- Add Transform, Sort, then sort by year
- Style of Trace:
- Set Stack to None
- Set Area Fill to X = 0
- In the JSON set autorange = “reversed”, to reverse the Y-Axis, hit save
- Format as desired.
The dataset this week can be viewed here: https://voteview.com/articles/party_polarization
Ensure you cite the sources before sharing:
Pew Research Centre : https://www.pewresearch.org/fact-tank/2022/03/10/the-polarization-in-todays-congress-has-roots-that-go-back-decades/
Source : Data Lewis, Jeffrey B., Keith Poole, Howard Rosenthal, Adam Boche, Aaron Rudkin, and Luke Sonnet (2023). Voteview: Congressional Roll-Call Votes Database. https://voteview.com/
After you finish your workout, share on Twitter using the hashtags #WOW2022 and #PowerBI, and tag @JSBaucke, @MMarie, @shan_gsd, @KerryKolosko, @NerdyWithData. Also make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year.