openpotato / openholidaysapi.data

Raw data for the OpenHolidays API project
https://www.openholidaysapi.org
Open Data Commons Open Database License v1.0
31 stars 20 forks source link

Portuguese subdivisions dont follow the ISO 3166-2:PT #49

Closed LEbsenH closed 4 months ago

LEbsenH commented 4 months ago

the data retrieved for portugal for holidays that arent nationwide show two-letter codes for districts but they dont follow any apparent ISO norm i could find. Imo they should follow ISO 3166-2:PT as described on https://en.wikipedia.org/wiki/ISO_3166-2:PT or I would need a list of the codes used in the API.

thanks for your work on this API :)

fstueber commented 4 months ago

Hi, ISO subdivision codes for Portugal are only defined for autonomous regions, not for municipalities. See https://www.iso.org/obp/ui/#iso:code:3166:PT. Or have I misunderstood something?

LEbsenH commented 4 months ago

Okay so thats why the communal ones dont apply, but where do you take the two-letter-codes from then? https://openholidaysapi.org/PublicHolidays?countryIsoCode=PT&languageIsoCode=DE&validFrom=2024-01-01&validTo=2025-01-01 lists a bunch of communal holidays with codes like these "subdivisions":[{"code":"PT-EV-MO","shortName":"EV-MO"}]}", where can i lookup what those mean? preferably only the first half not the specific city

fstueber commented 4 months ago

https://openholidaysapi.org/Subdivisions?countryIsoCode=PT&languageIsoCode=EN

fstueber commented 4 months ago

There is no standard for these kind of codes. I try to follow http://www.statoids.com/ypt.html, which is outdated for some countries, but a good starting point.