> ## Content Index
> Fetch the complete content index at: https://www.bambooweekly.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Bamboo Weekly #27: Young voters
- URL: https://www.bambooweekly.com/bw-27-young-voters/
- Published: 2023-08-02T15:01:29.000Z
- Updated: 2026-08-06T10:45:52.000Z
- Description: Get practice with Excel files, cleaning data, joins, multi-index, and styling
- Author: Reuven M. Lerner
- Tags: excel, cleaning, joins, multi-index, styling

It's August 2023, which means that US news outlets are already talking nonstop about the presidential election. You know, the presidential election that'll take place in November 2024, 15 months from now. If you live outside of the US, then it sounds a bit crazy to be focused on an election that's more than a year away. And if you live in the US, then you probably also see it as crazy, but also part of the normal political calendar. After all, the first primaries and caucuses will take place in January, only five months from now.

![](https://storage.ghost.io/c/06/ba/06ba0cc0-be6f-4de7-af2f-5c20165279b9/content/images/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https-3a-2f-2fsubstack-post-media.s3.amazonaws.com-2fpublic-2fimages-2f069b6f4d-4d3b-4f44-86de-947b1f0a53b4_512x512.jpg)

From Stable Diffusion, the result of entering “a baby voting.”

In some countries, citizens are required to vote (https://www.pbs.org/newshour/politics/22-countries-voting-mandatory). Not so in the United States, which means that part of the political game includes figuring out who is politically engaged enough to vote — as well as what topics are important to them, and what side of each issue they'll come out on.

While retirees and other older Americans are generally reliable voters, younger voters are far less reliable. In fact, young people tend not to show up. This is especially frustrating to politicans on the political left, because young voters are generally more progressive than their older counterparts.

That's a nice generalization -- but what do young Americans really think about current political issues? Do they think that their vote matters? Do they think that political involvement makes a difference? And where do they get their information from, anyway?

A recent column by Greg Sargent in the Washington Post ([https://www.washingtonpost.com/opinions/2023/07/25/voters-progressive-trump-harvard-youth-poll-gop/](https://www.washingtonpost.com/opinions/2023/07/25/voters-progressive-trump-harvard-youth-poll-gop/?ref=bambooweekly.com)) mentioned the results of the Harvard Youth Poll, which surveyed more than 2,000 Americans between the ages of 18 and 29\. This annual poll tries to understand what young people think about political issues, and about their involvement in the political process. You can be sure that pollsters and strategists in both major US political parties are looking at the results of this poll (whose results came out in April) to figure out how they can get young people to vote, and to vote for their candidates.

### Data and questions

The data this week comes from the Harvard Youth Poll ([https://iop.harvard.edu/youth-poll/45th-edition-spring-2023](https://iop.harvard.edu/youth-poll/45th-edition-spring-2023?ref=bambooweekly.com)). The data is all located in a single Excel document. But as you'll see, the way that the data was stored in the spreadsheet makes it ... messy to work with, even if it's easy for people to read and understand. But hey, that's what Bamboo Weekly is here for — to give you practice with real-world data, especially when that data is messy, right?

This week, I'm posing eight questions and tasks. The learning goals for this week include extracting data from Excel files, working with weird and strangely formatted input data, multi-indexes, and colorizing data frame cells:

- Download the Excel file from [/content/files/sites/default/files/2023-05/harvard-20iop-20youth-20poll-20spring-202023-20crosstabs.xlsx](https://www.bambooweekly.com/content/files/sites/default/files/2023-05/harvard-20iop-20youth-20poll-20spring-202023-20crosstabs.xlsx) .
- Grab the data from the "Likely voter 2024" question (starting on line 168 of the Excel file) into a data frame. Set the answers ("Definitely will be voting", etc.) to be the index. Remove the "All" column and the rows for "weighted N" and "unweighted N".
- What race/ethnicity has the highest percentage of people saying they'll definitely be voting? Which has the highest percentage saying they definitely \*won't\* be voting?
- Now grab the data from the "Sources for current events" question, starting on line 669, putting it into a data frame. Again, set the answers to be the index. Remove the "All" column and the rows for "weighted N" and "unweighted N".
- Among young people who are registered to vote, what are the three most common sources for them to learn about current events? What about for people who are \*not\* registered to vote?
- Now take the data from the "I don't believe my vote will make a real difference" question, starting on line 1315\. Again, set the answers to be the index. Remove the rows with net answers, as well as for weighted and unweighted N, and the "All" column. What education status believes ("strongly agree" or "somewhat agree") that their vote does \*not\* make a difference?
- Display all of the rows from this data frame, for all regions of the US. Colorize the cells of the data frame using a gradient, , so that the lowest values are red and the highest values are violet, along a spectrum..
- Now take data from the "feeling afraid" question, starting on line 1499, and turn it into a data frame. Turn the answers into the index. Remove the row with net answers, as well as those for weighted and unweighted N. Also remove the "All" column. Now show the answers as given for people from different regions with a colorized bar, with higher numbers having a longer colorized bar within the data frame's cell. Again, the lower numbers should be in red and the higher numbers should be in violet, as in a spectrum.

I’ll be back tomorrow with my solutions and explanations, as well as my Jupyter notebook.

Until then,

Reuven