georgiacivicdata.meta#
- georgiacivicdata.meta(x)#
Get the metadata carried by a result.
Every data frame from
rows()carries the response's metadata: what the rows are, where they come from and how to cite them.meta()returns it. Results ofsearch(), the zone functions andlocate()carry their notes the same way.Polars data frames have no attributes, so the package keeps the metadata beside the object itself: read it from the result as it came back, since a new data frame derived from it (a filter, a join) doesn't carry it. pandas results also hold it in
df.attrs["gcd_meta"], which pandas keeps through some operations.citation()also accepts a dataset name.- Parameters:
x (pandas.DataFrame or polars.DataFrame) -- A result of
rows()(or ofsearch(), a zone function orlocate()).- Returns:
dict -- For
rows():dataset(the name),title,detail,key_metric,units(each metric's unit),null_semantics(what a missing value means),source,source_url,citation,license,schema(the schema's path),advisories(a list of{"code", "message"}dicts),year_meaning,omitted_columns(columns left out because they were empty),data_version,updated_atandrequest_url. Fields the API didn't send are absent. Forsearch():confidence,retrievalandtotal_matches; for the zone functions andlocate():note(andassignment_note).
See also
citationcite the data.
Examples
>>> import georgiacivicdata as gcd >>> grad = gcd.rows( ... "graduation_rate_4_year_cohort", district="Fulton County", ... year=2024, demographic="all", ... ) >>> gcd.meta(grad)["advisories"]