-
Notifications
You must be signed in to change notification settings - Fork 1
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
boundary preprocessing #52
Conversation
this works but we will run into issues if we don't replace hardcoded OA21CD values downstream. See #39 (comment) for all parts of the code with hardcoded OA21CD |
@sgreenbury how do I add a parameter from the config to a src file? There seems to be two ways to do it:
Is approach 1 exclusively for scripts and approach 2 exclusively for src files? For context, I want to replace the hardcoded OA21CD value here with zone_id |
@sgreenbury I've updated the filtering so that we filter the boundary to match the spc region: acbm/scripts/0_preprocess_inputs.py Lines 45 to 64 in 7deda46
I think we can merge this now |
[zone_id, "MSOA21CD", "geometry"] | ||
] # we always need MSOA21CD to filter to study area | ||
print("keeping original OA boundaries") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should raise an exception here to handle any cases where geography provided is not "OA" or "MSOA"? E.g.:
else:
msg = f"Invalid geography: '{geography}'. Expected 'OA' or 'MSOA'."
raise ValueError(msg)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, done now: 5e47d0c
Are we able to now set |
This looks great @Hussein-Mahfouz with the boundaries configurable, derivable from the input population and handled first with additional preprocessing. Just a couple of comments/suggestions above and think it is good to merge. |
Yes we can do that. I'll make the edit
I think it's definitely helpful, especially if you want to run the optimization problem on a lower resolution (e.g. MSOA) regardless of whether boundary_geography is OA. However, I prefer doing it in a seperate PR as it will take some work and is not currently essential In terms of steps, it would require some edits to
|
That sounds great, thanks for identifying the steps, I'll reference your comment in a new issue for this. |
Ok great. The other 2 comments should be addressed in the last two commits |
That's great, looks good to me to merge! |
This PR should allow users to prepare the boundary layer for the study area of choice.
TODO before merging: