memilio icon indicating copy to clipboard operation
memilio copied to clipboard

AGS are stored as integers and missing leading zeros

Open JonasGilg opened this issue 10 months ago • 0 comments

Bug description

A lot of places are using the AGS to store information related to regions. In code integers are used to represent these ids, like here: https://github.com/SciCompMod/memilio/blob/339768e73182d7574fa3de1bc7b5d69bfdff0e4a/pycode/memilio-epidata/memilio/epidata/defaultDict.py#L206

This is wrong, as leading zeros are vanishing. The leading zeros are part of the AGS. Valid AGS can only have lengths of 2, 3, 5 and 8. The first two digits represent the federal state starting from 01 (Schleswig-Holstein) and ending at 16 (Thuringia).

For the first nine federal states this has led to many errors, when working with district data, as public datasets always contain the leading zeros, but exported data of memilio is missing them.

Version

Any

To reproduce

Relevant log output


Add any relevant information, e.g. used compiler, screenshots.


Checklist

  • [x] Attached labels, especially loc:: or model:: labels.
  • [ ] Linked to project

JonasGilg avatar Jan 17 '25 15:01 JonasGilg