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

How does one use the aggregate values? #21

Open
Deleetdk opened this issue Oct 18, 2016 · 0 comments
Open

How does one use the aggregate values? #21

Deleetdk opened this issue Oct 18, 2016 · 0 comments

Comments

@Deleetdk
Copy link
Contributor

Some tables have aggregate versions of some identifiers. For instance, FOLK2:

http://www.statistikbanken.dk/statbank5a/SelectVarVal/Define.asp?MainTable=FOLK2&PLanguage=1&PXSId=0&wsid=cftree

By default, it uses single years, but one can select 5 or 10 year aggregates in the menu. These options do not seem to be available using the API.

I looked in the network tool in Firefox. Switching between these does not change the URL, but it does send a POST form request. In this, there is a field called grouping1:

grouping1 = "" -- single years
grouping1 = "20063915132215154453" -- 10 year groups
grouping1 = "20063915451515155172" -- 5 year groups

Trying anyway gives an error:

> dkstat::dst_get_data("FOLK2", lang = "en",
+                      query = list(IELAND = "Denmark",
+                                   ALDER = "0-4 years"
+                      )
+ )
Error in dst_find_val_id(meta_data = meta_data, variable = names(query)[i],  : 
  All the values_text could not be matched in the text field of the values column of ALDER. It might be a typo or maybe the value isn't present in the variable.

It seems that we need some kind of way to access these data.

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

1 participant