While working on PR#7, I came across data from Zensus2011 to improve the generation of occupant number per flat. As with the other PR: if this doesn't fit your schedule/plan, I completely understand a refusal.
How was it handled before?
Previously, the number of occupants was selected on random from 2-5 (SFH&TH) or 1-4 (MFH&AB).
What was the problem with this implementation?
There really was no problem per se. I just found data that supported a more differentiated selection to represent the conditions in Germany.
How is it implemented now?
Zensus 2011 data lists the number of flats with a certan number of occupants (1 to 6+), sorted by the number of flats per building. The latter helps to sort the values according to the building type (SFH, TH, MFH, AB).
Considering SFH, taking the number of flats with 1 occupant and dividing it by the number of flats in SFH-buildings in total gives us the probability of a single person living in a flat of a SFH-type building. This is calculated for all building types. The corresponding probability values of a building type are then used to select the number of occupants in each flat of the building.
The category "6+ occupants" is considered as 6 occupants. Only 2.3/0.9/0.8 percent (!) of the flats of SFH-/MFH-/AB-type buildings fall into that category, respectively.
While tinkering with it a little bit, I noticed that the richardsonpy Tool does not allow for 6 or more inhabitants. That's a bit unfortunate. Have to look into a workaround for that.
What's this about?
While working on PR#7, I came across data from Zensus2011 to improve the generation of occupant number per flat. As with the other PR: if this doesn't fit your schedule/plan, I completely understand a refusal.
How was it handled before?
Previously, the number of occupants was selected on random from 2-5 (SFH&TH) or 1-4 (MFH&AB).
What was the problem with this implementation?
There really was no problem per se. I just found data that supported a more differentiated selection to represent the conditions in Germany.
How is it implemented now?
Zensus 2011 data lists the number of flats with a certan number of occupants (1 to 6+), sorted by the number of flats per building. The latter helps to sort the values according to the building type (SFH, TH, MFH, AB). Considering SFH, taking the number of flats with 1 occupant and dividing it by the number of flats in SFH-buildings in total gives us the probability of a single person living in a flat of a SFH-type building. This is calculated for all building types. The corresponding probability values of a building type are then used to select the number of occupants in each flat of the building.
The category "6+ occupants" is considered as 6 occupants. Only 2.3/0.9/0.8 percent (!) of the flats of SFH-/MFH-/AB-type buildings fall into that category, respectively.