Skip to content

Instantly share code, notes, and snippets.

@scottpham
Last active June 17, 2020 17:54
Show Gist options
  • Save scottpham/e6aff432d1db71611f7e9e8f9cee0677 to your computer and use it in GitHub Desktop.
Save scottpham/e6aff432d1db71611f7e9e8f9cee0677 to your computer and use it in GitHub Desktop.
[How to use the socrata API and python to download CMS data] #python
from sodapy import Socrata
import pandas as pd
# Endpoint: https://data.cms.gov/resource/s2uc-8wxp.json
set_id = "s2uc-8wxp"
client = Socrata("data.cms.gov/", None)
results = client.get(
set_id,
limit = 1000000
)
df = pd.DataFrame.from_records(
results
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment