Dataset Viewer
The dataset viewer is taking too long to fetch the data. Try to refresh this page.
Server-side error
Error code:   ClientConnectionError

The GLP-1 Spending Explosion (2017-2025)

Everyone's heard about Ozempic, Wegovy, and Mounjaro by now. But how much is Medicare actually spending on these drugs, and how fast is it growing? That's what this dataset is about.

I pulled together state-by-state Medicare Part D spending data on GLP-1 medications going back to 2017, when Ozempic first got FDA approval. The dataset covers all 50 states and territories through 2023 at the state level, plus provisional 2024 and 2025 national totals from the most recent quarterly reports. It's about 3,400 rows, not huge, but pretty rich for trend analysis.

Where the data comes from

Everything here was pulled from public APIs on data.cms.gov, which is CMS's open data site. No login, no API keys, no scraping. I merged two sources:

  1. Medicare Part D Prescribers - by Geography and Drug — this is where the state-level breakdowns come from (2017-2023)
  2. Medicare Quarterly Part D Spending by Drug — this gives us the most recent 2024/2025 year-to-date national totals

If you haven't explored data.cms.gov before, it's worth a look. The APIs are well-documented (data-api-documentation) and there's a lot more spending data beyond what I used here. The Quarterly API is actually part of a larger collection of drug spending datasets that includes Medicaid and Medicare Part B if you want to go broader.

If you're building automated pipelines, you can discover all the available API endpoints programmatically through their data.json catalog (it follows the DCAT-US 1.1 standard).

What's in the file

Column Type Description
Year int 2017 through 2025.
Data_Period_Type string Either Full Year or Partial Year (YTD). The 2024 and 2025 rows are provisional year-to-date rollups from the Quarterly API — they only have national-level totals, no state breakdowns or prescriber counts yet.
Geo_Level string National or State.
Geo_Desc string State or territory name (e.g., "Michigan", "Texas").
Brand_Name string Brand name (Ozempic, Wegovy, Trulicity, etc.).
Generic_Name string Generic name (Semaglutide, Tirzepatide, etc.).
Total_Prescribers float Number of distinct providers who prescribed the drug. Null for the provisional partial-year rows.
Total_Claims float Total prescriptions filled, including refills.
Total_Drug_Cost float Total Medicare Part D spending on the drug.

Things you could do with this

  • Dig into the provider level. Once you spot an interesting state, you can go deeper using the Prescribers - by Provider and Drug API to see which doctors and specialties are actually writing these prescriptions.
  • Project 2025 spending. The 2025 data only covers three quarters so far. What does the full year look like? The growth pattern from 2017-2023 was roughly exponential, but the 2024 jump was massive — a simple linear extrapolation probably won't cut it.
  • State-level forecasting. Which states are on track to cross $1B in GLP-1 spending first? There's seven years of adoption data here to work with.
  • Cross-reference with health data. Match states against CDC obesity prevalence or diabetes rates to see whether prescribing patterns actually follow the disease burden.

Ideas for AI and LLM projects

The data.cms.gov catalog is a good fit for a few AI related use cases:

  • RAG for healthcare economics. LLMs aren't great at precise financial figures. You could use the CMS APIs as a retrieval backend so an agent can answer things like "How much did Medicare spend on Ozempic in Michigan in 2023?" with real numbers instead of hallucinated ones.
  • Natural language to API queries. The CMS API supports filters, pagination, and sorting. You could fine-tune a model to translate plain English questions into the right API calls.
  • Benchmarking data agents. This dataset is a good test case for tools like PandasAI or LangChain DataFrame agents — give an agent the CSV and see if it can figure out the 2024 spending spike on its own.

Quick start

import pandas as pd

df = pd.read_csv("geospatial_glp1_spending_2017_2025.csv")

# State-level data for 2023
states_2023 = df[(df['Year'] == 2023) & (df['Geo_Level'] == 'State')]

# Ozempic spending in Michigan
 mi_ozempic = states_2023[(states_2023['Geo_Desc'] == 'Michigan') & (states_2023['Brand_Name'] == 'Ozempic')]
print(f"Michigan Ozempic Spending (2023): ${mi_ozempic['Total_Drug_Cost'].values[0]:,.2f}")
Downloads last month
31
Free AI Image Generator No sign-up. Instant results. Open Now