Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dulte committed Jul 26, 2024
1 parent 6032f6d commit 077a449
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pyaro_readers/eeareader/EEATimeseriesReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ def __init__(
)
files = self._create_file_list(filename, species)
lf = polars.scan_parquet(files)
df = lf.collect()
df = df.with_columns(
(polars.col("Samplingpoint").str.extract(r"(.*)/.*")).alias("Country Code")
)

return lf
return df
# folder_list = self._create_file_list(filename, species_ids)

def _create_file_list(self, root: Path, species: list[str]):
Expand Down Expand Up @@ -106,7 +110,7 @@ def is_valid_url(self, url):


if __name__ == "__main__":
filters = {"variables": {"include": ["SO2", "PM10"]}}
filters = {"variables": {"include": ["SO2", "PM10", "PM2.5"]}}
reader = EEATimeseriesReader(
"/home/danielh/Documents/pyaerocom/pyaro-readers/src/pyaro_readers/eeareader/data",
filters=filters,
Expand Down

0 comments on commit 077a449

Please sign in to comment.