-
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
create data layer for worldpop_age_sex #64
Conversation
@tedw0ng Agree that it should be sum() instead of mean(). I checked the original notebook and we are using also mean(): https://github.com/wri/cities-indicators/blob/emackres-patch-1/notebooks/extract-layers/extract-WorldPop-OpenSpaceTreeAccess.ipynb |
I also see that worldpop provides the data through a specific api now: https://www.worldpop.org/sdi/introapi/ |
I think the Worldpop API only returns JSON data, not rasters. That might be okay for indicators, but not for data layers. |
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.
Could add a test for the layer to check if it works well
|
||
|
||
class WorldPop(Layer): | ||
def __init__(self, **kwargs): |
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.
agesex_classes
should be added as an input parameter for __init__()
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.
added agesex_class as input parameter
The layer and test standard structure changed since this layer was created, so I fixed the conflict and updated the layer. @tedw0ng: Please pull the branch with the latest update, and test if the layer functions as you expected. One note is that I switched the aggregation for image collection back to |
…ldpop_agesex_classes
…cities-cif into add_worldpop_agesex_classes
Checked in this notebook and works globally well: https://colab.research.google.com/drive/1VtDgtQ_BVRh7h0QJ56ryfHJCByLs5Rqu#scrollTo=uXq9pqNOH7fw Proposed changes:
|
super().__init__(**kwargs) | ||
self.agesex_classes = agesex_classes |
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.
add comment n possible list of values here just for documentation: [M_0, M_1, M_5, M_10, M_15, M_20, M_25, M_30, M_35, M_40, M_45, M_50, M_55, M_60, M_65, M_70, M_75, M_80, F_0, F_1, F_5, F_10, F_15, F_20, F_25, F_30, F_35, F_40, F_45, F_50, F_55, F_60, F_65, F_70, F_75, F_80]
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.
@weiqi-tori url for dataset documentation in airtable: https://airtable.com/appDWCVIQlVnLLaW2/tblYpXsxxuaOk3PaZ/viwExxAgTQKZnRfWU/recFjH7WngjltFMGi?blocks=hide
Create data layer for Worldpop disaggregated data by age and sex groups.
Question: the regular worldpop layer has a .mean() line. Should it be sum()? Same question would apply to this new layer.