Revise urban/rural popualtion assignments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 148
- Forks
- 55
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 18
Description
Feature Request
In PyPSA-Eur, general urban/rural rates are given at a country level, then rural cells are assigned based on population density until the rural percentage for the country is reached.
In the rule build_population_layout, the rural and urban population are assigned on a county by county level. In some cases, where the county is smaller then a cell cutout, I believe some odd behaviour is happening. Therefore, rural/urban rates are the same for each cell in a county.
It would be nice to synchronize logic with PyPSA-Eur.
Suggested Solution
Commented code in build_population_layout.py has a suggested implementation.
Additional Info
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with build_population_layout.py and compare its commented implementation with the referenced PyPSA-Eur build_population_layouts.py section. Trace how rural and urban populations are assigned across counties and cells, then verify that the resulting rates match the PyPSA-Eur logic, including counties smaller than a cell cutout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100