Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt calculation/generation of number inhabitants #8

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

lensum
Copy link

@lensum lensum commented Aug 21, 2023

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.

@lensum
Copy link
Author

lensum commented Sep 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant