Socrata provides an API for city open data.For a dataset such as SF crime, see the API tab on top right.That provides you with the dataset identifier.Use the dataset identifier to grab specific tables for a given city_id (data.sfgov.org) -E.g., vw6y-z8j6 for SF 311 data.E.g., tmnf-yvry for SF Police data.
Copy
Ask AI
%pip install --upgrade --quiet sodapy
Copy
Ask AI
from langchain_community.document_loaders import OpenCityDataLoader