CorrelAid/restatis

gen_val (and others?) does not find all codes

Closed this issue · 1 comments

In a query with gen_val2var(), some codes are missing or the error message "No object found for your request" is displayed, although values are available (I have observed this for the variables WAM8 and WAM 4. ). For example: gen_val2var("WAM8", selection = "WA22082018") returns an error, and gen_val2var("WAM8", selection = "WA2208201*") returns only two entries, although five are available (This is also the case for some other codes, e.g. "WA22082016", "WA22082018", "WA22082019", "WA22082028", "WA22082066", "WA22082069", "WA22082088", "WA05080010", "WA05080090", "WA19019095", "WA04032011", "WA04032013", "WA04032019", "WA04032031", ...).
The query works when "area = "all" is added., e.g. gen_val2var("WAM8", selection = "WA22082018", area = "all").
I did not find a default value for area in the API documentation of DESTATIS. However, in the sample queries in the API documentation, the paramerter parameter "area=all" is always included. To fix the issue, it might make sense to implement the parameter "area=all" as a default value in the functions.

KovaZo commented

Hi @dakilian,

Thank you for pinpointing this male behavior. We will fix the issue in the new release of the package.
For now, the easiest solution is - as you mentioned - to specify the "area"-parameter.

Best,
Zoran