colearendt / tidyjson

Tidy your JSON data in R with tidyjson
Other
182 stars 14 forks source link

how to download Worldbank dataset with an api-call #138

Open marboe123 opened 2 years ago

marboe123 commented 2 years ago

Thank you for the great package since this is exactly what I am looking for.

In the package there is an example dataset from the Worldbank. Can you provide a link to the specific Worldbank api directory so I can download the dataset directly with an api-call?

I would like to import the data in Postman with an api-call in order compare it with the lay-out in tidyjson.

Thanks a lot!

colearendt commented 2 years ago

Howdy @marboe123 ! Glad to hear tidyjson has been useful for you!

Unfortunately, it looks like the source for the worldbank data (jsonstudio.com) now has its domain for sale, so it seems to be a bit of a dead end. As a result, I'm not sure that there is another source for this data? (It also predates me as the maintainer of the package, so there is no telling where it came from).

That said, I suspect you could write the data from the package as a JSON blob and then host that somewhere to retrieve? i.e. on a GitHub gist, S3 bucket, etc. You could even run a little webserver locally to retrieve the file as JSON - with plumber or otherwise. In fact, that may be the easiest - write a little plumber API that can return the worldbank data directly from the package.

I'm not in a place that I can write the example code for how to do that right now, but I can take a look later if that would be helpful!

marboe123 commented 2 years ago

Hello Cole Arendt,

Thanks a lot for your quick and extensive reply!

I will try to set up a plumber API with the json string from the package. I will let you know the outcome.

Thanks, Marcel

Op 24 aug. 2022 om 16:47 heeft Cole Arendt @.***> het volgende geschreven:

 Howdy @marboe123 ! Glad to hear tidyjson has been useful for you!

Unfortunately, it looks like the source for the worldbank data (jsonstudio.com) now has its domain for sale, so it seems to be a bit of a dead end. As a result, I'm not sure that there is another source for this data? (It also predates me as the maintainer of the package, so there is no telling where it came from).

That said, I suspect you could write the data from the package as a JSON blob and then host that somewhere to retrieve? i.e. on a GitHub gist, S3 bucket, etc. You could even run a little webserver locally to retrieve the file as JSON - with plumber or otherwise. In fact, that may be the easiest - write a little plumber API that can return the worldbank data directly from the package.

I'm not in a place that I can write the example code for how to do that right now, but I can take a look later if that would be helpful!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.