compass.utilities.finalize.doc_infos_to_db#
- doc_infos_to_db(doc_infos)[source]#
Convert list of docs to output database
- Parameters:
doc_infos (
Iterableofdict) –Iterable of dictionaries, where each dictionary has at least the following keys:
”ord_db_fp”: Path to parsed ordinance CSV file
”source”: URL of the file from which ordinances were extracted
”date”: Tuple of (year, month, day). Any of the values can be
None.”jurisdiction”: Instance of Jurisdiction representing the jurisdiction associated with these ordinance values.
If this iterable is empty, and empty DataFrame (with the correct columns) is returned.
- Returns:
ordinances (
pandas.DataFrame) – DataFrame containing ordinances collected from all individual CSV’s.count (
int) – Total number jurisdictions for which ordinances were found.