-
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
API inconsistently returns lower-level data for *Sonderformen* on level 3 #6
Comments
The Berliner Bezirke are another edge-case (same source):
So for r <- purrr::partial(read.csv, colClasses = "character")
r("https://tabular.genesapi.org/?data=12411:BEVSTD&time=2017&level=3&parent=11")
#> region_id year measure value statistic
#> 1 11000 2017 BEVSTD 3613495 12411
r("https://tabular.genesapi.org/?data=12411:BEVSTD(GES)&time=2017&level=3&parent=11")
#> region_id year measure value X12411.BEVSTD.GES. statistic
#> 1 11000 2017 BEVSTD 1776267 GESM 12411
#> 2 11000 2017 BEVSTD 1837228 GESW 12411
#> 3 11001001 2017 BEVSTD 0 GESM 12411
#> 4 11001001 2017 BEVSTD 0 GESW 12411
#> 5 11002002 2017 BEVSTD 0 GESM 12411
#> 6 11002002 2017 BEVSTD 0 GESW 12411
#> 7 11003003 2017 BEVSTD 0 GESM 12411
#> 8 11003003 2017 BEVSTD 0 GESW 12411
#> 9 11004004 2017 BEVSTD 0 GESM 12411
#> 10 11004004 2017 BEVSTD 0 GESW 12411
#> 11 11005005 2017 BEVSTD 0 GESM 12411
#> 12 11005005 2017 BEVSTD 0 GESW 12411
#> 13 11006006 2017 BEVSTD 0 GESM 12411
#> 14 11006006 2017 BEVSTD 0 GESW 12411
#> 15 11007007 2017 BEVSTD 0 GESM 12411
#> 16 11007007 2017 BEVSTD 0 GESW 12411
#> 17 11008008 2017 BEVSTD 0 GESM 12411
#> 18 11008008 2017 BEVSTD 0 GESW 12411
#> 19 11009009 2017 BEVSTD 0 GESM 12411
#> 20 11009009 2017 BEVSTD 0 GESW 12411
#> 21 11010010 2017 BEVSTD 0 GESM 12411
#> 22 11010010 2017 BEVSTD 0 GESW 12411
#> 23 11011011 2017 BEVSTD 0 GESM 12411
#> 24 11011011 2017 BEVSTD 0 GESW 12411
#> 25 11012012 2017 BEVSTD 0 GESM 12411
#> 26 11012012 2017 BEVSTD 0 GESW 12411 The 0s may not be an issue though, because:
However, regionalstatistik.de currently returns a Data from the Berliner Bezirke is also provided on the LAU 2 level.
On level 4, the pattern is reversed, i.e. we get the data for the Bezirke when we do not specify the r("https://tabular.genesapi.org/?data=12411:BEVSTD&time=2017&level=4&parent=11")
#> region_id year measure value statistic
#> 1 11000000 2017 BEVSTD 3613495 12411
#> 2 11001001 2017 BEVSTD 0 12411
#> 3 11002002 2017 BEVSTD 0 12411
#> 4 11003003 2017 BEVSTD 0 12411
#> 5 11004004 2017 BEVSTD 0 12411
#> 6 11005005 2017 BEVSTD 0 12411
#> 7 11006006 2017 BEVSTD 0 12411
#> 8 11007007 2017 BEVSTD 0 12411
#> 9 11008008 2017 BEVSTD 0 12411
#> 10 11009009 2017 BEVSTD 0 12411
#> 11 11010010 2017 BEVSTD 0 12411
#> 12 11011011 2017 BEVSTD 0 12411
#> 13 11012012 2017 BEVSTD 0 12411
r("https://tabular.genesapi.org/?data=12411:BEVSTD(GES)&time=2017&level=4&parent=11")
#> region_id year measure value X12411.BEVSTD.GES. statistic
#> 1 11000000 2017 BEVSTD 1776267 GESM 12411
#> 2 11000000 2017 BEVSTD 1837228 GESW 12411 Everything is reversed yet again if we retrieve level 3 r("https://tabular.genesapi.org/?data=12613:BEV002&time=2017&level=3&parent=11")
#> region_id year measure value statistic
#> 1 11000 2017 BEV002 34339 12613
#> 2 11001001 2017 BEV002 0 12613
#> 3 11002002 2017 BEV002 0 12613
#> 4 11003003 2017 BEV002 0 12613
#> 5 11004004 2017 BEV002 0 12613
#> 6 11005005 2017 BEV002 0 12613
#> 7 11006006 2017 BEV002 0 12613
#> 8 11007007 2017 BEV002 0 12613
#> 9 11008008 2017 BEV002 0 12613
#> 10 11009009 2017 BEV002 0 12613
#> 11 11010010 2017 BEV002 0 12613
#> 12 11011011 2017 BEV002 0 12613
#> 13 11012012 2017 BEV002 0 12613
r("https://tabular.genesapi.org/?data=12613:BEV002(GES)&time=2017&level=3&parent=11")
#> region_id year measure value X12613.BEV002.GES. statistic
#> 1 11000 2017 BEV002 16892 GESM 12613
#> 2 11000 2017 BEV002 17447 GESW 12613 level 4 r("https://tabular.genesapi.org/?data=12613:BEV002&time=2017&level=4&parent=11")
#> region_id year measure value statistic
#> 1 11000000 2017 BEV002 34339 12613
r("https://tabular.genesapi.org/?data=12613:BEV002(GES)&time=2017&level=4&parent=11")
#> region_id year measure value X12613.BEV002.GES. statistic
#> 1 11000000 2017 BEV002 16892 GESM 12613
#> 2 11000000 2017 BEV002 17447 GESW 12613
#> 3 11001001 2017 BEV002 0 GESM 12613
#> 4 11001001 2017 BEV002 0 GESW 12613
#> 5 11002002 2017 BEV002 0 GESM 12613
#> 6 11002002 2017 BEV002 0 GESW 12613
#> 7 11003003 2017 BEV002 0 GESM 12613
#> 8 11003003 2017 BEV002 0 GESW 12613
#> 9 11004004 2017 BEV002 0 GESM 12613
#> 10 11004004 2017 BEV002 0 GESW 12613
#> 11 11005005 2017 BEV002 0 GESM 12613
#> 12 11005005 2017 BEV002 0 GESW 12613
#> 13 11006006 2017 BEV002 0 GESM 12613
#> 14 11006006 2017 BEV002 0 GESW 12613
#> 15 11007007 2017 BEV002 0 GESM 12613
#> 16 11007007 2017 BEV002 0 GESW 12613
#> 17 11008008 2017 BEV002 0 GESM 12613
#> 18 11008008 2017 BEV002 0 GESW 12613
#> 19 11009009 2017 BEV002 0 GESM 12613
#> 20 11009009 2017 BEV002 0 GESW 12613
#> 21 11010010 2017 BEV002 0 GESM 12613
#> 22 11010010 2017 BEV002 0 GESW 12613
#> 23 11011011 2017 BEV002 0 GESM 12613
#> 24 11011011 2017 BEV002 0 GESW 12613
#> 25 11012012 2017 BEV002 0 GESM 12613
#> 26 11012012 2017 BEV002 0 GESW 12613 |
hey @dpprdan thanks for your issue reports. we are currently working some changes / fixes that might solve some of these, and we will come back to you afterwards to discuss this in more detail when we have released the latest changes |
When retrieving data for a Sonderform on the NUTS 3 Level (
level=3
), the tabular API sometimes (i.e. inconsistently IMHO) also returns data from the lower level. I think it should do this always (like regionalstatistik.de) or never (i.e. be consistent in applying the level parameter).Some background (from Regionaldatenbank Deutschland, Methodische Besonderheiten der Raumgliederung, 11. Februar 2019)
Now, when we try to retrieve data on level 3 for
12411:BEVSTD
for the Region Hannover from the tabular API, we get data for the Region but not the Stadt Hannover when we retrieve the total (i.e. without an dimension specified), but for both when we query for a specific dimension, e.g.(GES)
.The same is true Aachen (
parent=05334
) and Saarbrücken (parent=10041
).Details
So with
data=12411:BEVSTD(GES)
, i.e. when the query includes a dimension, we get data for lower-level regions than level 3. When the query does not include a dimension (justdata=12411:BEVSTD
), we don’t.I also tried this for
12613:BEV002
and there … it’s the other way around.Again the same pattern for the other regions.
Details
I see two options:
I am personally leaning towards 1. because
a) it resembles regionalstatistik.de,
b) for some dimensions there is generally no data available on level 4 (e.g.
12411:BEVSTD(NAT)
), except for the abovementioned cities (which resemble “kreisfreie Städte” in that regard), so https://tabular.genesapi.org/?data=12411:BEVSTD(NAT)&time=2017&level=4 would only provide data for those, which again, is unexpected (right now it throws a 500 error),c) you would have to introduce another level for Berliner Bezirke, see below.
The text was updated successfully, but these errors were encountered: