-
Notifications
You must be signed in to change notification settings - Fork 2
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
Avoid duplicate codes because of recodes #24
Comments
Multiple codes and labels are now concatinated using a semicolon. In the above example, the first classification (useful energy category) of is now parsed as follows
sc_table('test.json')$field("C-VERWEND0-0")
#> # STATcubeR metadata: 3 x 7
#> code label parsed
#> <chr> <chr> <chr>
#> 1 VERWEND0-1;VERWEND0-2 Space and water heating;Process heat <200 °C Space and water heating;Process heat <200 °C
#> 2 VERWEND0-1 Space and water heating Space and water heating
#> 3 SC_TOTAL Total Total
#> # … with 4 more columns: 'label_de', 'label_en', 'visible', 'order' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following json file is not handled correctly by
sc_table()
It results in duplicate codes for the field
C-VERWEND0-0
which causes all kind of issues with$tabulate()
because if implicit assumptions.The reason for that is that the
map
field in the json contains several URIs and only the first URI is used to generate the code column in$field()
. It should be made sure that unique codes are generated in this case, possibly by concatinating the codes of the individual uris. A fixed version might create a field definition like thisTime variables, should be converted to type category in this case, with a warning. Labels could also be concatenated. However, this would lead to very long labels which might not be ideal.
The text was updated successfully, but these errors were encountered: