I want to extract the time series from this time series plot
Inflation, consumer prices (annual %)
As you can see by hoovering over the plot you can see the data values.
I tried something like
library(rvest)
html_url<-read_html("https://data.worldbank.org/indicator/FP.CPI.TOTL.ZG")
But I am not sure how to move one
The wbstats, WDI and worldbank packages are specifically for downloading World Bank data. For the first two packages try this.
(The rworldmap package may also be of interest.) Use ?
to review additional arguments supported by these functions. Also the wbstats package comes with a vignette which provides more info.
library(wbstats)
dat <- wb_data("FP.CPI.TOTL.ZG")
library(WDI)
dat2 <- WDI(indicator = "FP.CPI.TOTL.ZG")
1