Free Messy Datasets for Data Cleaning Practice
Nine free public datasets for data cleaning practice, each with its license checked at the source, what makes it messy and what to practice on it.
By Tnas · Published · 12 min read

Good free datasets for data cleaning practice include UCI Online Retail, the MoMA and Met museum collection files, the CFPB Consumer Complaint Database, Open Food Facts and Inside Airbnb. For a gentle start, the Portal Project Teaching Database ships with a deliberately messy spreadsheet. Each source below was opened and its license checked at the source page on November 5, 2026, and each entry says what kind of mess to expect and what to practice on it.
Licenses matter more than most dataset lists admit. "Free to download" isn't the same as "free to reuse in a portfolio or a blog post", and the terms range from public domain to share-alike. Share-alike means that if you publish an adapted version of the data, it has to carry the same license.
Key Takeaways
- Every dataset here was checked at its source page. Three are public domain (CC0), four are CC BY 4.0, one uses the ODbL share-alike license, and one is a US government database described as free for anyone to use.
- Museum collection files are messy by nature: both MoMA and the Met say their records are incomplete or not fully reviewed.
- Large real datasets have no answer key. Use them for end-to-end practice after you're comfortable with the basic moves on small, checked exercises.
- Load every file as text first and profile it before cleaning, so the import doesn't quietly fix or break values for you.
- Check the license again when you download. Terms and file contents change, and attribution or share-alike conditions apply when you publish your work.
The datasets at a glance
| Dataset | Publisher | License (as stated at source) | Format | Good for practicing |
|---|---|---|---|---|
| Online Retail | UCI ML Repository | CC BY 4.0 | Excel (.xlsx) | Cancellations, types, duplicates |
| Adult (Census Income) | UCI ML Repository | CC BY 4.0 | Zip of .data/.test text files | Missing-value encodings, categories |
| MoMA collection | Museum of Modern Art | CC0 | CSV, JSON | Free text, incomplete records, encoding |
| Met open access | Metropolitan Museum of Art | CC0 | CSV | Very large files, incomplete records |
| Consumer complaints | CFPB (US government) | "Freely available for anyone to use" | CSV (zip), API | Dates, categories, caveated analysis |
| Open Food Facts | Open Food Facts | ODbL (database), DbCL (contents) | CSV (tab-separated), JSONL, Parquet | Crowdsourced values, very large files |
| Inside Airbnb | Inside Airbnb | CC BY 4.0 | CSV (gzipped), GeoJSON | Joins across files, number parsing |
| FiveThirtyEight data | FiveThirtyEight | CC BY 4.0 unless noted | CSV | Small, varied tables per article |
| Portal Project Teaching Database | Ernest, Brown, Valone, White (figshare) | CC0 | CSV, JSON, Excel, SQLite | Deliberately messy spreadsheet |
The sections below give the details and a suggested exercise for each.
Retail and transaction data
UCI Online Retail
The Online Retail dataset holds 541,909 transaction lines from a UK online retailer, with eight variables including invoice number, stock code, quantity, unit price, customer ID and country. The UCI page lists the license as CC BY 4.0 and offers the data as a single Excel file.
The useful mess is documented on the page itself: an invoice number starting with the letter "c" marks a cancellation (the query below uses a case-insensitive match, ILIKE, so either case is caught). That means a naive revenue total is wrong before you touch a single value.
Practice on it: separate cancellations from sales, decide what a cancellation line means for revenue, check whether the same invoice line appears more than once, and confirm that customer IDs survive the trip out of Excel as identifiers rather than numbers. The UCI page states the dataset has no missing values, so count blanks in every column yourself and compare. Profiling claims against documentation is a skill in its own right.
UCI Adult (Census Income)
The Adult dataset has 48,842 rows and 14 features drawn from census records, and is licensed CC BY 4.0. The UCI page says the dataset has missing values, and its variables table flags columns including workclass and occupation, but doesn't say how those missing entries are written.
Practice on it: find out how missing values are actually encoded before you count them, then decide whether they should become real nulls, an explicit "Unknown" label or stay as they are. It's a compact way to practice the difference between a missing value and a value that only looks like one.
Museum collection data
Museum catalogs are some of the best free practice material because they were typed by many people over many years, and the museums say openly that the records are unfinished.
Museum of Modern Art collection
MoMA publishes its collection data on GitHub as Artworks and Artists files in both CSV and JSON. The README states the data is placed in the public domain under CC0, and at the time of checking listed 160,928 artwork records and 15,999 artist records.
The README is candid about quality: some records are incomplete and marked "not Curator Approved", much of the data hasn't been reviewed by curators, and the files are updated regularly. It also warns that Mac Excel can misread the UTF-8 CSVs.
Practice on it: load the CSV as text, check names with accented characters for encoding damage, and profile the free-text columns before deciding which you'd parse into proper types and which you'd leave as text.
The Met open access CSV
The Metropolitan Museum of Art's open access repository provides MetObjects.csv, covering more than 470,000 artworks, under CC0. The README says "parts of the datasets are incomplete" and that the data is provided as is.
Two practical notes from the README: the file is stored with Git Large File Storage, so a plain clone may not fetch it, and it carries the same Mac Excel UTF-8 warning as MoMA's.
Practice on it: this is the dataset to use when you want to feel the difference between a spreadsheet and a real tool. Profile it in DuckDB or pandas, find columns that are mostly empty, and write rules for the few columns a specific question needs.
Government and civic data
CFPB Consumer Complaint Database
The US Consumer Financial Protection Bureau's Consumer Complaint Database can be downloaded in full as a zipped CSV or queried through an API, and generally updates daily. The page doesn't name a formal license; it says the complaint data is "freely available for anyone to use, analyze, and build on."
The page also gives an important caveat for analysis: the database is not a statistical sample of consumers' experiences, so complaint counts need context such as company size before you compare them.
Practice on it: parse the date columns explicitly, check the category columns for near-duplicate labels, and practice writing a short data quality note that states what the data can and can't support. That last part is what turns a cleaning exercise into analysis work.
Crowdsourced and community data
Open Food Facts
Open Food Facts is a crowdsourced database of food products. The data page states that the database is available under the Open Database License (ODbL), individual contents under the Database Contents License, and product images under CC BY-SA. Exports include tab-separated UTF-8 CSV (about 0.9 GB compressed and about 9 GB uncompressed for the food file), JSONL and a Parquet version.
Unlike the others, the ODbL is share-alike: if you publish an adapted version of the database, it has to be shared under the same license, and public uses need attribution. Read the terms before you put a cleaned copy on GitHub.
Practice on it: pick one country and a handful of columns, then profile values entered by many different contributors: look for inconsistent units, labels in more than one language and numbers stored as text, and decide what your question needs. The file is far too large for Excel, which makes it good DuckDB practice.
Inside Airbnb
Inside Airbnb publishes snapshots as gzipped CSV files (detailed listings, calendar and reviews) plus a neighbourhoods GeoJSON file. The page states the data is licensed under CC BY 4.0.
Practice on it: check how prices are stored and convert them to an exact decimal if they arrive as text, join listings to reviews and calendar rows without fan-out, and check whether every listing's neighbourhood appears in the neighbourhood list. It's a good dataset for practicing joins across files that came from the same scrape.
Journalism data
FiveThirtyEight data repository
The FiveThirtyEight data repository holds the data behind the site's articles, with an index.csv listing each dataset. The README says the data sets are available under CC BY 4.0 unless otherwise noted, and that sports predictions stopped being updated on June 13, 2023.
These tables are mostly tidy already, so they're less "messy" than the others. Their value is variety: dozens of small, documented tables.
Practice on it: pick one table, read its README, and write checks that each column matches what the README says: types, allowed values and ranges. Any mismatch is a question you'd take back to the publisher.
A dataset built to be messy
Portal Project Teaching Database
The Portal Project Teaching Database, by Morgan Ernest, James Brown, Thomas Valone and Ethan P. White, is a teaching version of a long-running ecology study. Its figshare record lists the license as CC0 and includes files named survey_data_spreadsheet_messy.xls and untidy-portal-data.xlsx alongside clean CSV, JSON and SQLite versions.
The Data Carpentry spreadsheet lesson uses a subset that has been "intentionally 'messed up'" for teaching. (The lesson page describes the source database as CC-BY; the figshare record itself says CC0.)
Practice on it: the lesson's formatting data episode sets the task. Two field assistants kept a year of surveys each (2013 and 2014) "in their own way", and you combine the two tabs into one clean table without modifying the original. The database's clean CSVs show the target structure: one row per observation, with consistent codes. They aren't a row-by-row answer key for this file. Instead, check that every observation from both tabs lands in exactly one row of your result, keeping in mind that a single spreadsheet row in a messy layout can hold more than one observation.
How to start on any of these datasets
Whichever dataset you pick, begin the same way: load every column as text, then profile it before changing anything. Letting a tool guess types on import can silently drop leading zeros, turn IDs into floats or misread dates.
Here is that first pass in DuckDB on a six-row sample shaped like the Online Retail file. The values are made up for illustration, not taken from the real file. Save this as orders_sample.csv:
invoice,stock_code,quantity,unit_price,customer_id,country
536365,85123A,6,2.55,17850,United Kingdom
536365,71053,6,3.39,17850,United Kingdom
C536379,D,-1,27.50,14527,United Kingdom
536381,22139,3,4.95,,United Kingdom
536381,22139,3,4.95,,United Kingdom
536390,84879, 8 ,1.69,17511,united kingdom
Then profile it:
SELECT
count(*) AS rows,
count(DISTINCT invoice) AS invoices,
count(*) FILTER (WHERE invoice ILIKE 'c%') AS cancellations,
count(*) FILTER (WHERE customer_id IS NULL) AS missing_customer,
count(*) FILTER (WHERE quantity <> trim(quantity)) AS padded_quantity,
count(DISTINCT country) AS country_spellings
FROM read_csv('orders_sample.csv', all_varchar = true);
┌───────┬──────────┬───────────────┬──────────────────┬─────────────────┬───────────────────┐
│ rows │ invoices │ cancellations │ missing_customer │ padded_quantity │ country_spellings │
│ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │
├───────┼──────────┼───────────────┼──────────────────┼─────────────────┼───────────────────┤
│ 6 │ 4 │ 1 │ 2 │ 1 │ 2 │
└───────┴──────────┴───────────────┴──────────────────┴─────────────────┴───────────────────┘
all_varchar = true keeps every value exactly as written, so the padded quantity and the two spellings of the country are still visible. A second query finds lines with the same invoice, stock code and quantity:
SELECT invoice, stock_code, quantity, count(*) AS copies
FROM read_csv('orders_sample.csv', all_varchar = true)
GROUP BY ALL
HAVING count(*) > 1;
┌─────────┬────────────┬──────────┬────────┐
│ invoice │ stock_code │ quantity │ copies │
│ varchar │ varchar │ varchar │ int64 │
├─────────┼────────────┼──────────┼────────┤
│ 536381 │ 22139 │ 3 │ 2 │
└─────────┴────────────┴──────────┴────────┘
Whether those two lines are a duplicate export or a customer genuinely buying the same item twice is a question for the data owner, not something the query can decide. That's typical of real datasets: profiling turns up questions, and the cleaning rules come from the answers. The guide to profiling a new dataset has a fuller query set, the lesson on importing everything as text first explains why the first step matters, and reading CSV files safely covers delimiters and encodings.
Public datasets versus practice exercises
Real datasets teach judgment, but they can't tell you whether you were right. Nobody publishes the "correct" clean version of the Met's collection. That makes them a poor place to learn individual techniques and a good place to apply them.
A practical order is to build the basic moves on small, checked tasks first, such as the free order-line export exercise or parsing dates by declared locale, and then take one of the datasets above end to end. The practice datasets on this site are small tables with a written data dictionary for each, designed to sit between the two. For how to practice in general, see how to practice data cleaning.
Before you use any dataset: a license checklist
- Read the license on the source page, not on a mirror. Re-uploads on other sites sometimes drop or change the terms.
- Note attribution requirements. CC BY 4.0 and ODbL require credit when you share your work; CC0 doesn't, though MoMA's README still asks for attribution as a courtesy.
- Watch for share-alike terms. ODbL requires adapted databases to be shared under the same license.
- Check for personal data. Even public data can contain names or free-text narratives. Don't republish more than your project needs.
- Record the download date and version. Several of these sources update daily or regularly, so your numbers may not match someone else's.
Once you've picked a dataset, the portfolio project guide shows how to turn the cleaning into something you can show, and data cleaning projects for beginners suggests scoped project ideas.
Frequently asked questions
Are Kaggle datasets OK for data cleaning practice?
Often, yes, but Kaggle hosts uploads from many different people, and licenses vary from dataset to dataset. Some uploads are copies of sources like the ones above with different or missing terms. Check the license on each dataset page, and prefer the original publisher's copy when one exists.
Can I put a cleaned public dataset in my portfolio?
Usually, if the license allows redistribution. CC0 data can be shared freely; CC BY 4.0 requires attribution; ODbL requires attribution and share-alike for adapted databases. When in doubt, publish your cleaning code and a summary of results instead of the cleaned file, and link to the original source.
Which dataset should a beginner start with?
The Portal Project Teaching Database, because the task is clearly defined by the Data Carpentry lesson, and the clean CSVs show the structure to aim for. After that, UCI Online Retail is a manageable size with a clear, documented quirk to handle.
Related reading
Sources
All pages retrieved November 5, 2026.
- UCI Machine Learning Repository, Online Retail (CC BY 4.0).
- UCI Machine Learning Repository, Adult (CC BY 4.0).
- The Museum of Modern Art, collection repository and README (CC0).
- The Metropolitan Museum of Art, Open Access repository and README (CC0).
- Consumer Financial Protection Bureau, Consumer Complaint Database.
- Open Food Facts, data and license page (ODbL / DbCL / CC BY-SA images).
- FiveThirtyEight, data repository README (CC BY 4.0 unless noted).
- Inside Airbnb, Get the data (CC BY 4.0).
- Morgan Ernest, James Brown, Thomas Valone, Ethan P. White, Portal Project Teaching Database, figshare (CC0).
- Data Carpentry, Data Organization in Spreadsheets for Ecologists, including the formatting data episode.
- License texts: CC BY 4.0, CC0 1.0, ODbL 1.0.
- The SQL examples were run with DuckDB 1.5.1 on a six-row illustrative sample.