Performance gains when converting xml structure to df #221
StefanSchellerer
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for the proposal. There is a ticket open here to suggest move from XML to xml2 #196. Feel free to create a PR to support this, but in that case it needs to be systematic on all classes/methods of the R package, not specific to one type of data and provider. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While working with the new IMF Data API, I explored its documentation, which references the rsdmx package for use with R: IMF API Documentation. However, using this approach can lead to significant waiting times due to the transformation of XML objects into R data.frames. To address this issue, I developed a more efficient solution. Instead of relying on (nested) loops, which can be time-consuming, my approach leverages the length of the XML objects to efficiently join the "Series" attributes with their associated "Obs" elements.
Feel free to use this code to potentially improve the rsdmx performance.
Best wishes!
Beta Was this translation helpful? Give feedback.
All reactions