Downloads¶
pyopenstates
also has some basic methods to help you deal with Open States' bulk data.
See https://openstates.org/data/session-csv/ for more information.
FileType (Enum)
¶
enum specifying the various types of files available from the CSV bulk data:
Bills
Actions
Sources
Sponsorships
Versions
VersionLinks
Votes
VotePeople
VoteSources
Organizations
People
load_csv(state, session, file_type)
¶
Returns an instantiated csv.DictReader
to iterate over the requested file.
load_merged_dataframe(state, session, which)
¶
Returns a populated pandas.DataFrame
with the requested content.
FileType.Actions
, FileType.Sources
, FileType.Versions
, FileType.Sponsorships
will be merged against a FileType.Bills
dataframe.
FileType.VersionLinks
will be merged against both a FileType.Versions
and FileType.Bills
dataframe.
FileType.VotePeople
, FileType.VoteCounts
, and FileType.VoteSources
will be merged against a FileType.Votes
dataframe.
Other types will be returned as-is.