Relative Content

Tag Archive for rweb-scraping

Download IMF data

I am trying to download data with imf.data package. Below you can see my code with example of single country.

Data scrape in R with cookies or other hidden user data

I have a working data / web scrape function in R using HTTR and POST to scrape public data on a number of police statistics, but the code only seems to work sporadically. I suspect this is the result of cookies, but so far my attempts to add any code that would preserve or reset cookies hasn’t fixed things. The following code has worked repeatedly to collect information on one instance, but then fails to collect the same data subsequently (this would eventually iterate on the unique identifier within “payload” after “values,” here with the example ID 940216):