-
Notifications
You must be signed in to change notification settings - Fork 6
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
label support #15
Comments
Hi @zedoul! Do you mean support as is currently described like this in # You can also read in using the typically terser IDs rather than labels.
results <- fromJSONstat(readLines(oecd.canada.url), naming="id") The key part there is the Let me know if that works for you, or whether you mean something else. (Also, I haven't used |
Thank you for your response :D
No. What I asked was to create label attribute by using toJSONstat function like AS-IS
TO-BE
I know this example is bad xD, this is exactly the same as in the official website (https://json-stat.org/format/#label). But, for some case, I need label attribute. The point is, I hope to add label attribute by using toJSONstat function, and it is not related with fromJSONstat. |
Ah! Okay, I think I see. Seems like a good idea! |
@zedoul created a package that (I guess?) implements this idea and "implement[s a] tidyverse-like way of describing JSON-stat description not the rjstat way". I haven't checked it out, but maybe it's great! |
I don't see the point of having two similar (but different) JSON-stat packages for R. Can @zedoul's new functionality be included in rjstat? |
I think it could be, but I'm not totally sure what the changes are; I'd love to see a PR. |
Hi such a nice package. Any chance you are going to add a "label" support as it is in JSON stat offical example? Adding label attribute, which is the same level as index attribute, would be helpful.
Just to make things clear: here is one example for label attribute (https://json-stat.org/samples/oecd.json)
And here is the result of rjstat:
which has labels data in index attribute, not separated.
I wonder this difference between official one and outcome of rjstat, is something you intended to do or something that needs to be improved. The official site (https://json-stat.org/format/#index) states that the first one is recommended --- "For efficiency reasons (see Arrays vs. Objects), an object that attaches a position to every ID can also be used (this is currently the recommended format)."
If you have no plan to introduce that feature yet, then do you have any idea of how to achieve that? I may implement that feature, but I know not the whole picture of this package so it would be great to know some direction.
Thank you.
The text was updated successfully, but these errors were encountered: