Function reference
Convert country climate data to Parquet files.
This package provides functionality to find and convert country climate data, assumed to be stored as CSVs, to Parquet files.
This package contains the functions:
get_data_names()
- Returns names of climate data sources.clim_to_parquet()
- Converts climate data to a single Parquet file.
clim_to_parquet(data_source, dir_from, dir_to, admin_level=None, gadm_version='v410')
Convert country climate data to a Parquet file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_source
|
str | list[str]
|
A data source or a list of data sources. See available data sources in
|
required |
dir_from
|
(str, Path)
|
Path to the CSV data directory, as a |
required |
dir_to
|
str | Path
|
Path to the output directory where Parquet files will be saved, as a
|
required |
admin_level
|
(int, list[int])
|
GADM admin level as an integer or a list of integers. May have values in the range 0 -- 3. Defaults to 0 indicating country level data. |
None
|
gadm_version
|
str
|
GADM version as a string. Default is "v410" for v4.1.0. No other versions are currently supported. |
'v410'
|
Returns:
Type | Description |
---|---|
None
|
Called for the side effect of converting CSV data files to Parquet. |
Raises:
Type | Description |
---|---|
ValueError
|
If |
Exception
|
If |
Warns:
Type | Description |
---|---|
UserWarning
|
If no climate files are found in the input directory. |
Source code in src/clim2parquet/__init__.py
get_data_names()
Get data source names.
Returns:
Type | Description |
---|---|
list[str]
|
A list of data source names. |