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

subtotals but no (grand) totals returned #5

Open
dpprdan opened this issue Nov 21, 2019 · 0 comments
Open

subtotals but no (grand) totals returned #5

dpprdan opened this issue Nov 21, 2019 · 0 comments
Assignees
Labels
bug Something isn't working GenesAPI wontfix This will not be worked on

Comments

@dpprdan
Copy link

dpprdan commented Nov 21, 2019

The tabular API returns subtotals but no (grand) totals when dimensions without specific values are specified (i.e. ?data=<id>:<attr>(<dim>)).

I think it would be preferable to always return grand totals (only per year, of course). If one does not want grand totals, one can specify the desired values, after all.

To illustrate, I am retrieving population data with a simple R function for better readability.

r <- purrr::partial(read.csv, colClasses = "character")
r("https://tabular.genesapi.org/?data=12411:BEVSTD(NAT,GES)&time=2017&region=01001")
#>   region_id year measure value X12411.BEVSTD.GES. X12411.BEVSTD.NAT. statistic
#> 1     01001 2017  BEVSTD  6674               GESM               NATA     12411
#> 2     01001 2017  BEVSTD 37412               GESM               NATD     12411
#> 3     01001 2017  BEVSTD 44086               GESM                        12411
#> 4     01001 2017  BEVSTD  5071               GESW               NATA     12411
#> 5     01001 2017  BEVSTD 39362               GESW               NATD     12411
#> 6     01001 2017  BEVSTD 44433               GESW                        12411
#> 7     01001 2017  BEVSTD 11745                                  NATA     12411
#> 8     01001 2017  BEVSTD 76774                                  NATD     12411

Here we get subtotals for nationality and gender, respectively, but no grand totals. Note that the subtotals are not tagged (e.g. “GESAMT”) which they probably should be. If we retrieve the data for gender or nationality independently from each other, we do not get totals either.

r("https://tabular.genesapi.org/?data=12411:BEVSTD(GES)&time=2017&region=01001")
#>   region_id year measure value X12411.BEVSTD.GES. statistic
#> 1     01001 2017  BEVSTD 44086               GESM     12411
#> 2     01001 2017  BEVSTD 44433               GESW     12411
r("https://tabular.genesapi.org/?data=12411:BEVSTD(NAT)&time=2017&region=01001")
#>   region_id year measure value X12411.BEVSTD.NAT. statistic
#> 1     01001 2017  BEVSTD 11745               NATA     12411
#> 2     01001 2017  BEVSTD 76774               NATD     12411
@crijke crijke added bug Something isn't working GenesAPI labels Nov 29, 2019
@P3nny P3nny added the wontfix This will not be worked on label Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GenesAPI wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants