get_epu()
function collects the EPU data and outputs an xts object. The required argument is region which is a character indicating the region of EPU data you need. By default, it collects all regions.
The data collection is in real time and normally takes about several seconds to download.
As it is a xts
object, so dygraph
can be directly applied for interactive plots.
region =
argument:
Another way to get country level data is to directly manipulate the all_data object:
The difference is that usingregion
will take care of the NA values so there is no large white area in the plot. However, it is not a problem in xts
, just delete the NAs.
The US TPU data is one of the category-specific EPU indices developed in the original paper by Baker et al. (2016). “It reflects the frequency of articles in American newspapers that discuss policy-related economic uncertainty and also contain one or more references to trade policy”. To get the US TPU data:
China TPU index is constructed by Steven J. Davis, Dingqian Liu and Xuguang S. Sheng using the Renmin Daily and the Guangming Daily.To get the China TPU:
Japan TPU is also available, to get Japan TPU: The japan TPU data also contains EPU, FPU, MPUI, and ERPU. If you need TPU, simply:The default get_emv
collects all categories constituting the index and the output can be quite messy. If only the overall EMV is in need, set all = FALSE
. Also, it is suggested to keep the default all = TRUE
and manipulate the xts
output as needed.
The official WUI data set excel file contains several sheets, and the name of which becomes the argument option of the get_wui()
function. They are:
Therefore, to get the overall WUI:
To get the World Trade Uncertainty Index, use “T8”. The output xts
data object contains data for 143 countries, so it might be better to plot only the data you need.
Data is available at monthly and quarterly frequencies. get_fsi()
outputs monthly data by default.
There are 4 types: 1. type= 1 for quarterly GRI, 2. type = 2 for GPRH, 3. type = 3 for GPR of countries, 4. type = 4 for GPR words.
Data from the EPU website have different sources, with different data formats and frequencies. epuR
takes cares of the nuisances by providing a consistent way of collecting different index data.