georgiacivicdata.contract#
- georgiacivicdata.contract(name, file=None)#
Get a dataset's data contract.
The dataset's formal, versioned contract in the Open Data Contract Standard (ODCS v3.2): its schema, quality rules,
versionandschema_hash. For data engineers building pipelines and anyone citing the exact schema. Most users wantdescribe()instead.Datasets and the
school_attendance_zonesgeometry dataset have contracts; lookup tables andschool_district_boundariesdo not.- Parameters:
name (str) -- A dataset name.
file (str or path-like, optional) -- If given, the contract is written there verbatim as YAML and the path is returned. Default: return the contract as a dict.
- Returns:
dict or path -- The contract as a nested dict (parsed from its JSON form), or, with
file, the path.
See also
describea readable summary.
Examples
>>> import georgiacivicdata as gcd >>> spec = gcd.contract("graduation_rate_4_year_cohort") >>> spec["version"] >>> gcd.contract("graduation_rate_4_year_cohort", file="contract.yaml")