> ## 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 #42: Plant hardiness
- URL: https://www.bambooweekly.com/bw-42-plant-hardiness/
- Published: 2023-11-29T16:01:04.000Z
- Updated: 2026-08-06T10:45:40.000Z
- Description: Get better at: CSV files, index operations, string operations, multi-indexes, cleaning, and plotting.
- Author: Reuven M. Lerner
- Tags: csv, index-operations, strings, multi-index, cleaning, plotting

When I was little, my mother tried to teach me the names of flowers and trees. Let's be charitable, and say that I didn't pay very much attention. I'm a bit better nowadays, and enjoy the many colorful flowers in my backyard. Plus, I take a daily early-morning walk through multiple parks, giving me a chance to see flowers. But let's be honest; aside from a few standouts, I'm still pretty bad at knowing just what I'm seeing.

Fortunately, the world is full of people who know more than I do about plants. As they know, not all plants are appropriate for all climates and seasons. Which raises the question: What's appropriate for where you live? If you live in Phoenix, Arizona, then you're unlikely to be planting the same flowers as people in Minneapolis, Minnesota.

![](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-2f8fbaa63e-5ed6-4f98-84cf-cdb98d18ef6f_1024x1024.png)

The US Department of Agriculture (USDA) has figured this out, at least for residents of the continental United States: They defined 13 different zones, each of whose mean minimum temperature varies by about 10 degrees Fahrenheit. Each zone is divided into two sub-zones, labeled a and b, with 5-degree spreads. The basic idea is that if you live in zone 5a, and you move somewhere else that's also in zone 5a, you should be able to grow the same plants.

The data was collected by the PRISM research group at Oregon State University ([https://prism.oregonstate.edu/projects/plant\_hardiness\_zones.php](https://prism.oregonstate.edu/projects/plant%5Fhardiness%5Fzones.php?ref=bambooweekly.com)). A new data set was just released on November 15th by the US Department of Agriculture (the USDA, at [https://www.ars.usda.gov/news-events/news/research-news/2023/usda-unveils-updated-plant-hardiness-zone-map/](https://www.ars.usda.gov/news-events/news/research-news/2023/usda-unveils-updated-plant-hardiness-zone-map/?ref=bambooweekly.com)). I learned about it from John Dickerson's "chatter" in the most recent Slate Political Gabfest ([https://slate.com/podcasts/political-gabfest/2023/11/issue-polling-israel-palestine-oslo-sam-altman-openai](https://slate.com/podcasts/political-gabfest/2023/11/issue-polling-israel-palestine-oslo-sam-altman-openai?ref=bambooweekly.com)). It was also described in an NPR report, at [https://www.npr.org/2023/11/17/1213600629/-it-feels-like-im-not-crazy-gardeners-arent-surprised-as-usda-updates-key-map](https://www.npr.org/2023/11/17/1213600629/-it-feels-like-im-not-crazy-gardeners-arent-surprised-as-usda-updates-key-map?ref=bambooweekly.com).

This week, we'll look through this data as released in 2012 and again in 2023, to better understand how the temperature zones have changed (and how they haven't), and where they have changed the most.

### Data and eight questions

This week's data comes in several parts:

First, we'll use the latest (2023) Plant Hardiness Zone report from [https://prism.oregonstate.edu/projects/plant\_hardiness\_zones.php](https://prism.oregonstate.edu/projects/plant%5Fhardiness%5Fzones.php?ref=bambooweekly.com) . The data comes in several formats and parts; we'll use the CSV file that provides us with data per US zip code:

[https://prism.oregonstate.edu/projects/phm\_data/phzm\_us\_zipcode\_2023.csv](https://prism.oregonstate.edu/projects/phm%5Fdata/phzm%5Fus%5Fzipcode%5F2023.csv?ref=bambooweekly.com)

Next, we'll download data from the previous survey in 2012, described at [https://prism.oregonstate.edu/projects/plant\_hardiness\_zones\_2012.php](https://prism.oregonstate.edu/projects/plant%5Fhardiness%5Fzones%5F2012.php?ref=bambooweekly.com) :

[https://prism.oregonstate.edu/projects/public/phm/2012/phm\_us\_zipcode\_2012.csv](https://prism.oregonstate.edu/projects/public/phm/2012/phm%5Fus%5Fzipcode%5F2012.csv?ref=bambooweekly.com)

Finally, we'll download and work with a CSV file containing US zip codes:

[http://uszipcodelist.com/zip\_code\_database.csv](http://uszipcodelist.com/zip%5Fcode%5Fdatabase.csv?ref=bambooweekly.com)

I have eight tasks and questions for you this week. Among the learning goals are: Setting dtypes, string handling, multi-indexes, joins, and plotting:

- Create data frames from the 2012 and 2023 plant hardiness zone data. Each data frame should have a 5-character "zipcode" column, as well as a "zone" column with the zone's name and a "trange" column with the range it includes. Make the "zipcode" column the index.
- Create a data frame from the zip code database, in which the 5-character "zip" column is the index.
- How many zip codes are in the 2012 report, but not in the 2013 report? According to our zip-code database, how many zip codes from each state went missing in those 11 years?
- In each of the 2012 and 2023 data frames, create two new columns, "trange\_min" and "trange\_max", containing the min and max temperatures of the "trange" column. Remove the original "trange" column.
- Create a new data frame, combining the 2012 and 2023 data frames. The index should contain the combination of all zip codes from both reports. The columns should be a multi-index, with the top level being the year (2012 or 2023), and the column names remaining from the original data frames.
- On average, how much has the minimum temperature in a zip code changed from 2012 to 2023?
- Find zip codes in the top 10% of minimum temperature increase. What states are they in? Do you see anything odd with the number of zip codes in the top state?
- Create a scatter plot where the x axis is the longitude, the y axis is the latitude, the color is based on the minimum temperature in 2012, and we only look at longitude < -60\. How does it look?

Questions, comments, or other thoughts? Share them here!

I’ll be back tomorrow with my solutions and explanations.

Reuven