Due: Nov 22 by 11:59pm
Weight: This assignment is worth 9% of your final grade.
Purpose: At some point in your career, you will likely be involved in creating or revising a summary chart of some data. When that happens, you will also likely be the most knowledgeable person in the room about what to do to design the chart(s) to effectively communicate the information in the data. Claude Code can write the ggplot code once you know what you want – but deciding what “leadership” means in this data, choosing the right chart type for each message, and honestly critiquing whether your redesign actually improved things are judgment calls no agent can make for you. This assignment is a practice run for that day.
Assessment: Your submission will be assessed using the rubric at the bottom of this page.
Background
The American Wind Energy Association (AWEA) is a national trade association that advocates for the wind power industry. They also publish data on wind power statistics in the U.S. The authors of this article at howmuch.net got a hold of some of this data and published this unfortunate chart:
For this assignment, you will use code to redesign the above chart. In this redesign, we are interested in exploring this question:
Which states are leaders in wind energy?
The answer depends on what you consider a “leader” to be. For example, the authors of the above chart clearly viewed the installed capacity as the most important metric to highlight. But this chart also contains lots of other data, such as the amount of money each state invested and the number of homes powered by wind in each state. Some states may be leading in other ways, such as the capacity built per dollar of investment.
With that in mind, here’s what you need to do for this analysis:
1. Get organized
Open your course repo (eda-f26/eda-netID) in Positron using File › Open Folder and open it to the mini3 folder.
Everything for this assignment lives in the mini3 folder. Inside it you’ll find report.qmd and a data folder. Click on report.qmd. That is the primary file you will edit to conduct your analysis.
Update the YAML with your name, a title, the date, etc.
Be sure to delete any of the existing text / code in report.qmd before submitting - it is just there as a helpful guide.
Points will be taken off for failing to follow these basic organizing steps.
Paths inside report.qmd are relative to the mini3 folder, so refer to the data as file.path('data', 'US_State_Wind_Energy_Facts_2018.xlsx').
2. Load the data
The US_State_Wind_Energy_Facts_2018.xlsx file is already in your data folder. Have Claude Code read it in. Here is some information on the data:
Description: Data on which US states produce the most wind energy.
Source of downloaded file: The formatted Excel spreadsheet was downloaded from data.world: https://data.world/makeovermonday/2019w8
Original source: The primary source is the American Wind Energy Association (https://www.awea.org/), but the source for this particular data was found on this article, which cites the AWEA.
Data dictionary:
Ranking |
Rank order of state by installed capacity |
State |
U.S. state |
Installed Capacity (MW) |
Installed capacity in MW |
Equivalent Homes Powered |
Number of homes powered by wind power |
Total Investment ($ Millions) |
Total Investment in $ millions |
Wind Projects Online |
Number of projects currently online |
# of Wind Turbines |
Number of wind turbines in state |
3. Preview the data
Preview the data yourself (e.g. using head(), glimpse(), View(), and / or make some quick plots – Hint: look at the top and bottom!). Take note of what variables are available, their types, what they measure, and if there are any missing values. (Hint: Read the data dictionary!) Are all the variables encoded the way you would expect (e.g. are numbers encoded as numbers)? Noticing this yourself matters – it’s what you’ll tell the agent to fix in the next step.
4. Clean the data
Have Claude Code modify variable types and names to get the data frame cleaned up for analysis. As it does, column names with spaces in them (e.g. Installed Capacity (MW)) should get renamed to make later code easier to write (Hint: the clean_names() function from the janitor package is a life saver!). Write a few sentences describing what modifications were made and why.
5. Plan Your Approach
Before you prompt the agent to make any charts, decide what “leadership” means for each of the two visualizations you’ll build.
- Examine measures of centrality and variability in the variables relevant to leadership in wind energy. Installed capacity is an obvious choice, but also look at other values, such as the amount of money invested, and at least two other computed measures, such as capacity per dollar invested (Note: you’ll need to create new variables to do this!).
- For each of your two planned charts (see Step 6), write down: which metric it will highlight, why that metric represents a meaningful kind of “leadership,” and what chart type you plan to use and why it fits that metric and message. Do this before prompting the agent to generate the chart – it’s much easier to tell if a chart the agent produced is a good match for your goal if you already know what you were going for.
Deliverable: Your summary measures with a short explanation of what you learned from them, plus your plan for both charts (metric + chart type + rationale) written before the charts themselves.
6. Direct the Agent to Visualize
Now prompt Claude Code to build your two charts, reviewing what it produces and iterating rather than accepting the first attempt automatically.
- An appropriate visualization that highlights leadership in installed capacity. This chart should be a substantial improvement over the original visualization, and it should follow the design principles we have covered in class.
- A second visualization that highlights “leadership” in another metric of your choice, following your plan from Step 5. This chart should be a different style from your first chart – don’t just copy-paste the same chart type over a new variable.
Your charts should be polished. Points will be taken off for poor design principles, illegibility, etc.
Note: Claude Code should directly edit your report.qmd file.
7. Critique Your Redesign
Producing a chart that looks better than the original is not the same as verifying it actually is better. Before you write your summary, critically re-examine your own two charts – this is the step most heavily graded in this assignment.
- Check for new distortions. Does either chart truncate an axis, use a misleading sort order, or use color in a way that exaggerates or obscures the pattern? Redesigns can introduce new problems even while fixing old ones.
- Check under an alternative cut. Pick one chart and recompute it with a different normalization or metric (e.g. per capita, per project, or a different time slice if applicable). Does the “leadership” story hold up, or does it depend heavily on which metric you picked?
- Name a real limitation. A genuine critique finds at least one honest weakness in your own redesign – not just a list of what you improved.
Deliverable: A short critique section documenting what you checked and what you found, including anything you changed as a result.
8. Summarize Your Analysis
Write a summary of your analysis process. I’m specifically looking for a discussion of the following:
- What was wrong with the original chart? Discuss specific design principles we have covered in class.
- Discuss the improvements your first revised chart makes compared to the original chart.
- Discuss what message your second chart conveys and what design choices you made to highlight that message.
- Reference what you found in Step 7 – what, if anything, would you still change or caveat about your redesign?
9. Render and submit
To submit your assignment, follow these instructions:
- Render your
report.qmd file by either clicking the “Preview” button in Positron or running quarto render in the terminal.
- Open the rendered
report.html file and proofread it – make sure there are no errors and all the formatting looks as you expected.
- Run
/export in Claude Code and save the result as transcript.md in your mini3 folder. This is a required part of your submission – it’s how your verification is checked.
- Check that your
mini3 folder contains exactly three files – report.qmd, report.html, and transcript.md – plus the data folder.
- Commit and push your work using GitHub Desktop: look at the diff, write a short commit message, click Commit, then Push.
Your work isn’t submitted until you’ve pushed it. Committing only saves the change on your own computer – go look at your repo on GitHub.com and confirm your work is actually there before you call this done.
Grading Rubric
40 Total Points
| Organization & Formatting |
5
Data placed in correct folder, read in, and variables have been renamed for ease of use in analysis. |
4
Data not placed in correct folder OR variables were not renamed. |
3
Data not placed in correct folder AND variables were not renamed, or not properly read into R. |
| Data Summary |
5
Measures of centrality and variability in appropriate variables are computed; at least two new useful "leadership" measures are computed, each with a brief written rationale for why it matters. |
4
Measures of centrality and variability are computed, but only one new useful measure is computed, or the rationale for the chosen measures is thin or missing. |
3
Measures of centrality and variability missing; failed to compute new measures. |
| Data Visualization 1 |
7 - 8
Chart expertly demonstrates best practices of visual design and highlights leadership in installed capacity. |
5 - 6
Chart generally demonstrates best practices of visual design and highlights leadership in installed capacity; some elements might be confusing. |
0 - 4
Chart generally lacks best practices of visual design; elements are confusing, does not highlight leadership in capacity. |
| Data Visualization 2 |
7 - 8
Chart expertly demonstrates best practices of visual design, uses a genuinely different chart style from Visualization 1, and conveys a clear message. |
5 - 6
Chart generally demonstrates best practices of visual design and conveys a reasonably clear message; some elements might be confusing or too similar in style to Visualization 1. |
0 - 4
Chart generally lacks best practices of visual design; elements are confusing, does not highlight a clear message, or is just a copy of Visualization 1 applied to a new variable. |
| Critique & Verify |
8 - 9
Clearly explains specific design flaws in the original chart (naming principles from class) and why each redesign choice was made; then critically re-examines the redesign itself -- checking whether it introduces any new distortions (e.g. truncated axes, misleading sorting or color choices) and whether the "leadership" claim still holds under at least one alternative cut of the data. The self-critique finds and names at least one real limitation, rather than only praising the new chart. |
5 - 7
Describes flaws in the original chart and redesign choices adequately, but the self-critique of the redesign is thin, generic, or only checks the chart superficially (e.g. "it looks better") without checking for new distortions or an alternative cut of the data. |
0 - 4
Poor or missing description of design flaws and improvements; no genuine self-critique of the redesign is attempted. |
| Technical & Process |
5
All code runs without errors; the mini3 folder pushed to GitHub contains exactly report.qmd, report.html, and transcript.md. |
4
Code has only one or two errors, otherwise runs; the pushed mini3 folder is missing one of the three required files or includes extra clutter. |
3
Code has multiple errors; html file cannot be rendered without significant changes; work was never pushed to GitHub; or the pushed mini3 folder is missing report.qmd, report.html, or transcript.md. |