zensvi.metadata.KVMetadata ========================== .. py:class:: zensvi.metadata.KVMetadata(path_input: Union[str, pathlib.Path], log_path: Optional[Union[str, pathlib.Path]] = None) Bases: :py:obj:`zensvi.metadata.base_metadata.BaseMetadata` Compute metadata for a KartaView (KV) dataset. Normalizes the columns of a KartaView ``kv_pids.csv`` (produced by ``KVDownloader``) to the schema expected by :class:`BaseMetadata`: - ``shotDate`` (``"%Y-%m-%d %H:%M:%S%.f"``, UTC) -> ``captured_at`` (ms since Unix epoch) - ``heading`` -> ``compass_angle`` - ``sequenceId`` -> ``sequence_id`` - ``userId`` -> ``creator_id`` - ``orgCode`` -> ``organization_id`` - ``id``, ``lat``, ``lon``, ``is_pano`` are used as-is. :param path_input: path to the input CSV file (e.g. ``kv_pids.csv``). :type path_input: Union[str, Path] :param log_path: Path to the log file. Defaults to None. :type log_path: Union[str, Path], optional .. py:method:: compute_metadata(unit: str = 'image', grid_resolution: int = 7, coverage_buffer: int = 50, indicator_list: str = 'all', path_output: Optional[Union[str, pathlib.Path]] = None, max_distance: int = 50) -> pandas.DataFrame Compute metadata for the dataset. :param unit: The unit of analysis. Defaults to "image". :type unit: str :param grid_resolution: The resolution of the H3 grid. Defaults to 7. :type grid_resolution: int :param indicator_list: List of indicators to compute metadata for. Use space- separated string of indicators or "all". Options for image-level metadata: "year", "month", "day", "hour", "day_of_week", "relative_angle", "h3_id", "speed_kmh". Options for grid-level metadata: "coverage", "count", "days_elapsed", "most_recent_date", "oldest_date", "number_of_years", "number_of_months", "number_of_days", "number_of_hours", "number_of_days_of_week", "number_of_daytime", "number_of_nighttime", "number_of_spring", "number_of_summer", "number_of_autumn", "number_of_winter", "average_compass_angle", "average_relative_angle", "average_is_pano", "number_of_users", "number_of_sequences", "number_of_organizations", "average_speed_kmh". Defaults to "all". :type indicator_list: str :param path_output: Path to save the output metadata. Defaults to None. :type path_output: Union[str, Path] :param max_distance: The maximum distance to search for the nearest street segment. Defaults to 50. :type max_distance: int :returns: A DataFrame containing the computed metadata. :rtype: pd.DataFrame