cfasodapy¶
See the API reference for specifics.
Getting an app token¶
- Navigate to https://evergreen.data.socrata.com/
- Create an account and sign in
- Under Developer Settings, create an App Token
See the Socrata docs on app tokens and how to obtain one.
Writing queries¶
The Socrata docs can be hard to navigate. The key pages are:
- Queries using SODA3: Describes the "options" in the query, including the SoQL query string.
- The query Option: The syntax for the SoQL query string.
- SoQL Function and Keyword Listing
- Data Transform Listing
Confusingly, the docs use term "query" to refer to the data passed to the API endpoint as well as to the query string in that data.
Working with polars¶
cfasodapy returns data as a list of dictionary records, which can be read into a polars dataframe with polars.from_dicts().