These exercises explore checkout data from the Seattle Public Library for authors in the post-1945 volumes of the Norton Anthology of American Literature, one of the most widely used literary anthologies in U.S. college classrooms. The dataset was compiled as part of the research paper “The Canon in Circulation” (Gupta et al., 2025). The code and data are available on GitHub, and you can explore more of the analysis here. For more context, see the Library Checkouts for the Top 500 “Greatest” Novels data essay.
Concepts covered:
Groupby and aggregation (sum of checkouts)
Sorting and ranking (top N values)
Horizontal bar charts
Filtering by a specific author
Time series line plots (monthly checkouts over time)
Load the data
Code
import pandas as pdimport plotly.express as pxnorton_df = pd.read_csv("https://seattle-library-checkout-data.s3.us-west-2.amazonaws.com/norton-anthology_spl-checkouts_2005-2025.csv")norton_df.head()
/tmp/ipykernel_8165/3604736084.py:4: DtypeWarning:
Columns (11) have mixed types. Specify dtype option on import or set low_memory=False.
CheckoutDate
UsageClass
CheckoutOutType
MaterialType
CheckoutYear
CheckoutMonth
Checkouts
Title
Creator
Subjects
Publisher
PublicationYear
ISBN
Normalized.Creator
Normalized.Title
BirthYear
DeathYear
Work.In.Norton
0
2016-10-01
Digital
OverDrive
AUDIOBOOK
2016
10
1
The Natural (Unabridged)
Bernard Malamud
Classic Literature, Fiction
Blackstone Audio, Inc.
2008
NaN
Bernard Malamud
The Natural
1914
1986.0
False
1
2016-10-01
Digital
OverDrive
EBOOK
2016
10
1
The Assistant
Bernard Malamud
Fiction, Literature
Macmillan Publishers
2013
NaN
Bernard Malamud
The Assistant
1914
1986.0
False
2
2016-11-01
Digital
OverDrive
EBOOK
2016
11
1
The Magic Barrel
Bernard Malamud
Fiction, Literature
Macmillan Publishers
2013
NaN
Bernard Malamud
The Magic Barrel
1914
1986.0
True
3
2016-11-01
Digital
OverDrive
EBOOK
2016
11
1
The Assistant
Bernard Malamud
Fiction, Literature
Macmillan Publishers
2013
NaN
Bernard Malamud
The Assistant
1914
1986.0
False
4
2016-12-01
Digital
OverDrive
EBOOK
2016
12
1
The Fixer: A Novel
Bernard Malamud
Fiction, Literature
Macmillan Publishers
2013
NaN
Bernard Malamud
The Fixer
1914
1986.0
False
Exercise 1
Find the top 10 authors by total checkouts in the Norton Anthology SPL checkouts dataset. Create a horizontal bar chart to visualize the results.
Discuss/consider: Which authors from the Norton Anthology are most popular at the Seattle Public Library? Are these authors you expected to see at the top?
Exercise 2
Find the top 10 titles by total checkouts. Create a horizontal bar chart to visualize the results.
Discuss/consider: Which titles are checked out most frequently? How do these compare to the most popular authors?
Exercise 3
Create a time series line plot showing monthly checkouts for Octavia E. Butler over time.
Filter the data for Octavia E. Butler, group by year and month, and plot the results.
Code
butler_df = norton_df[norton_df['Normalized.Creator'] =='Octavia E. Butler']butler_monthly = butler_df.groupby(['CheckoutYear', 'CheckoutMonth'])['Checkouts'].sum().reset_index()butler_monthly['date'] = pd.to_datetime( butler_monthly['CheckoutYear'].astype(str) +'-'+ butler_monthly['CheckoutMonth'].astype(str) +'-01')fig = px.line(butler_monthly.sort_values('date'), x='date', y='Checkouts', title='Monthly SPL Checkouts for Octavia E. Butler')fig.show()
Discuss/consider: What patterns do you notice in the checkout trends for Octavia E. Butler? Are there any notable spikes or dips? What might explain them?