Skip to content

Instantly share code, notes, and snippets.

@willjobs
Created July 25, 2021 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willjobs/13dc5b19dcc7346f95d01219c1286116 to your computer and use it in GitHub Desktop.
Save willjobs/13dc5b19dcc7346f95d01219c1286116 to your computer and use it in GitHub Desktop.
medium-public-comments-07
# get the comment headers for these criteria
params = {"filter[lastModifiedDate][ge]": "2017-01-01 00:00:00", # API for dockets doesn't have postedDate filter
"filter[lastModifiedDate][le]": "2020-12-31 23:59:59", # also, these times are in Eastern time zone
"filter[agencyId]": "EPA",
"filter[searchTerm]": "water"}
# this will download the headers 250 dockets at a time, and save the headers into a CSV
# (you could also save them into a SQLite database)
downloader.gather_headers("dockets", params, csv_filename="EPA_water_dockets.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment