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

local query of agesex populations #33

Open
wcjochem opened this issue Nov 11, 2021 · 2 comments
Open

local query of agesex populations #33

wcjochem opened this issue Nov 11, 2021 · 2 comments

Comments

@wcjochem
Copy link

Hi,

I was trying to query only a single age-sex group using a local SQL database. In getPopSql() here: https://github.com/wpgp/wopr/blob/master/R/getPopSql.R#L73 the code collapses to a vector when agesex_select has a length of 1 (e.g. 'm0'). If you add the option drop = FALSE to the data frame that will preserve the 2 dimensional structure that apply expects. Happy to submit a quick pull request with the change, if you'd like.

@wcjochem
Copy link
Author

Hi @edarin,

And a follow-up related question... is the standard/expected format for an age-sex table documented? Again when I'm using getPopSql() that same line of code (from above) is expecting row numbers to match the IDs of the table. Could there be a check for that or an option for a user to instead supply a column identifying the age-sex region? Thanks.

@edarin
Copy link
Member

edarin commented Nov 16, 2021

Ha - sorry I didn't get notified previously. I'm looking at it now.

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

No branches or pull requests

2 participants