ManualInputUsaParser
¶
ManualInputUsaParser()
Main parser for the technology_data manual_input_usa.csv dataset.
Dispatches to version-specific parser implementations.
Methods:
-
get_supported_versions–Return a list of supported dataset versions.
-
parse–Parse the specified version of the technology_data manual_input_usa.csv dataset.
get_supported_versions
¶
get_supported_versions() -> list[str]
Return a list of supported dataset versions.
parse
¶
parse(version: str, input_path: Path, num_digits: int, archive_source: bool, filter_params: bool, export_schema: bool) -> None
Parse the specified version of the technology_data manual_input_usa.csv dataset.
This method selects the appropriate parser for the given version and delegates the parsing task to it.
Parameters:
-
version(str) –The version of the dataset to parse (e.g., 'v0.13.4').
-
input_path(Path) –Path to the raw input data file.
-
num_digits(int) –Number of significant digits to round the values, by default 4.
-
archive_source(bool) –If True, archives the source object on the Wayback Machine, by default False.
-
filter_params(bool) –If True, filters the parameters stored in the output, by default False.
-
export_schema(bool) –If True, exports the Pydantic schema for the data models, by default False.
Raises:
-
ValueError–If the specified version is not supported.
ManualInputUSAV0134Parser
¶
Bases: ParserBase
Parser for v0.13.4 of the manual_input_usa.csv dataset.
Methods:
-
parse–Parse and process version 0.13.4 of the manual_input_usa.csv dataset.
parse
¶
parse(input_path: Path, num_digits: int, archive_source: bool, **kwargs: Any) -> None
Parse and process version 0.13.4 of the manual_input_usa.csv dataset.
This method reads the raw data from an Excel file, cleans and transforms it through a series of steps, and then builds a TechnologyCollection. The processed data is saved to JSON files.
Parameters:
-
input_path(Path) –Path to the raw input data file (Excel).
-
num_digits(int) –Number of significant digits to round numerical values.
-
archive_source(bool) –If True, archives the source object on the Wayback Machine.
-
**kwargs(bool, default:{}) –export_schema : bool If True, exports the Pydantic schema for the data models.
Returns:
-
TechnologyCollection–A collection of parsed technology data.