diff --git a/CHANGELOG.md b/CHANGELOG.md index ee15aa27..68b61594 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - ES-CL: the ITACyL server is https-only, the 2025 shapefiles sit in province subfolders, and C_REFREC is the identifier - A test refuses a fixture above 5 MB, committed or merely lying in the fixture folder, because a failing convert test downloads the real source there - ES-MD: find RECINTO.shp wherever the archive puts it +- EC-EE: name the shapefile inside the archive, migrate the year column the release actually has, and require only what every parcel carries - ES-CAT: the 2024 download is a shapefile package, and 34 crop names new in that edition are mapped - DE-NDS: give the collection an id (the row index), which it was published without - DE-BB: ref_ident holds the FLIK (field block reference), not a farmer, and the shapefile is cp1252 diff --git a/fiboa_cli/datasets/ec_ee.py b/fiboa_cli/datasets/ec_ee.py index 682df4d8..13b0cc19 100644 --- a/fiboa_cli/datasets/ec_ee.py +++ b/fiboa_cli/datasets/ec_ee.py @@ -10,7 +10,11 @@ class Convert(EuroCropsConverterMixin, FiboaBaseConverter): ec_mapping_csv = "ee_2021.csv" ec_year = 2021 - sources = "https://zenodo.org/records/14094196/files/EE_2021.zip?download=1" + sources = { + "https://zenodo.org/records/14094196/files/EE_2021.zip?download=1": [ + "EE_2021/EE_2021_EC21.shp" + ] + } id = "ec_ee" short_name = "Estonia" title = "Field boundaries for Estonia" @@ -36,16 +40,16 @@ class Convert(EuroCropsConverterMixin, FiboaBaseConverter): "taotleja_n": "taotleja_nimi", # name of applicant "taotleja_r": "taotleja_registrikood", # applicant's registration code } - column_migrations = {"JAHR": lambda col: pd.to_datetime(col, format="%Y")} + # The shapefile truncates taotlusaasta ("application year") to ten characters; + # it holds a bare year, which has to become a datetime for the STAC extent. + column_migrations = {"taotlusaas": lambda col: pd.to_datetime(col, format="%Y")} missing_schemas = { "required": [ - "taotletud_kultuur", "taotletud_maakasutus", "viimase_muutmise_aeg", "taotleja_nimi", ], "properties": { - "taotletud_kultuur": {"type": "string"}, "taotletud_maakasutus": {"type": "string"}, "niitmise_tuvastamise_staatus": {"type": "string"}, "niitmise_tuvast_ajavahemik": {"type": "string"},