
This morning we learned the commands for looking at a table for the first time. This afternoon we will point those same commands at a National Park Service file that we have not opened together in class. You and your partner will work out what is in the file using the commands from this morningβs session.
Work in pairs, in one shared notebook, taking turns at the keyboard. Swap every time you finish one of the seven steps under βWorking through itβ below. The partner who is not typing should read the output (quietly!) and say what the next cell will produce before you run it. Getting a prediction wrong is useful, and a wrong prediction is much easier to spot once you have said it out loud.
We have 45-60 minutes for this activity, so please let Kelly or Cella know if you are getting stuck!
The data
US National Park Service visitor records:
https://eds-217-essential-python.github.io/data/national_parks.csv
A link is all we are giving you, since we also reviewed opening files into dataframes this morning. Working out what is in the file is the exercise, so Cella and Kelly will happily help with any code that will not run or generates an error (but try to read any errors closely and see if you can determine what Python is trying to tell you is going wrong)
Setup
Create a notebook named Colab_2C_Unfamiliar_Data.ipynb, and give it a markdown cell at the top:
# Day 2: Colab 2C - Five Claims About a Dataset You've Never Seen
Names:
Date: 09/01/2026Put both of your names in it, then read the file in with pd.read_csv().
Your goal
By the end of the session, your notebook should hold five factual claims about this dataset, each written in a markdown cell, and each one immediately preceded by the code cell that produced the numbers in it.
A claim is factual if a skeptical reader could check it against your output. Here is a vague claim and a factual one, both about the Toolik weather file we used yesterday:
β βThe Toolik file has a lot of missing data.β
β β
Daily_globalrad_total_jcm2is missing on 7,053 of the 11,171 days, andDaily_AirTemp_Mean_Cis missing on none of them.β
At least one of your five claims must be about a problem with the data (there is more than one problem in this file to find!).
Working through it
Donβt start by writing claims. Explore the file first, and then decide which of the things you found are worth writing down.
Size it up. Start with
.shapeand.columns. How many rows and columns are there, and what are the columns called?Check the types. Run
.dtypes. At least one column is not the type its name suggests. Find it, and then work out why by looking at what is actually in that column.Run the health check. Use
.info()and.isnull().sum(). Which columns have missing values, and how many rows are missing in each one?Count the categories. Run
.value_counts()on at least three of the text columns. Which of them would help you tell one row from another, and which would not?Summarize the numbers. Run
.describe(). In one column the mean sits a long way from the median, which can be (but isnβt always!) a sign of an issue in the data. Specify the column, say which of its statistics you would refuse to report, and connect it back to what you found in step 2. While you are there, check whether any numeric column holds the same value in every row.Make a working subset. Build a list of the columns you would actually want to keep, select them into a smaller DataFrame, and rename at least one of those columns using a dictionary.
Write your five claims. For each one, put the code cell first, and then a markdown cell stating the claim in a full sentence with the actual numbers in it.
If a column of years is not stored as a number, then something in that column is not a year. Run .value_counts() on it, look down the list for the values that are not years, and count how many rows they account for. Come and find Cella or Kelly if the result still doesnβt make sense!
Write a sixth claim about something you would need to know before you could use this file to answer βwhich national park is the most visited?β You do not need to answer that question today, because we will build the tools for it over the next three days. Just say what would have to be true about the data first.
Wrap-up
At the end of the session, if we have time, we will hear two or three pairs read out the problem they found in the data. Be ready to say how you found it, and not just what it was!