cartoreader_lite.low_level.utils¶
Utility functions to more easily read and write the CARTO3 files on a low level.
Functions
|
|
|
|
|
|
|
|
|
|
|
Reads connector data from the main XML element, pointing to multiple files with the attached connector data. |
|
|
|
Reads all the available point data for given map and point ID, along with its metadata. |
|
|
|
|
|
|
|
|
|
|
|
- cartoreader_lite.low_level.utils.read_connectors(xml_elem: xml.etree.ElementTree.Element, path_prefix: str) Dict[str, List[pandas.core.frame.DataFrame]]¶
Reads connector data from the main XML element, pointing to multiple files with the attached connector data.
- Parameters
xml_elem (Element) – The XML Connector element where the data will be found
path_prefix (str) – The path prefix where to search for the connector files
- Returns
A dictionary mapping from the connector names to the associated pandas DataFrames that will contain the connector data.
- Return type
Dict[str, List[pd.DataFrame]]
- cartoreader_lite.low_level.utils.read_point_data(map_name: str, point_id: int, path_prefix: Optional[str] = None) Tuple[Dict, Dict]¶
Reads all the available point data for given map and point ID, along with its metadata.
- Parameters
map_name (str) – Name of the map
point_id (int) – Point ID to read
path_prefix (str, optional) – Path prefix used while looking for files. Will default to the current directory
- Returns
A tuple containing both a dictionary of metadata and the actual data
- Return type
Tuple[Dict, Dict]