SciCompMod / memilio

Modular spatio-temporal models for epidemic and pandemic simulations
https://scicompmod.github.io/memilio/
Apache License 2.0
53 stars 16 forks source link

plot_map function should not be dependent of dataframe index #955

Open patricklnz opened 7 months ago

patricklnz commented 7 months ago

Bug description

plot_map assigns values to the map on index instead of CountyID. This can lead to wrong results, which may not be noticed by the creator of the map. E.G: By merging the counties Wartburgkreis and Eisenach one of the counties gets deleted from the dataframe, but (dependent on how the merging is done) the index is not adjusted to the new dataframe. By that, all values of those counties after the respective CountyID will not be assigned to the right county in the map.

Version

Windows

To reproduce

  1. Take a Dataframe with wartburgkreis and eisenach or with all berlin districts.
  2. merge countyIDs
  3. run plot_map function

Relevant log output

No response

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

No response

Checklist