Monthly FX rates - EUR/PLN

Description

Purpose of the App is to show the monthly exchange rates between EUR (base currency) and PLN (quote currency).

Time frame is set for the last 12 months.

Data are fetched to a data template in real time through rejustify.

Repository details: ECB/EXR

Developed and hosted by rejustify.com

Deployed with Shiny



Loading...
Loading...
Loading...

            

Package install and load

install.packages("remotes")
remotes::install_github("rejustify/r-package")
library(rejustify)

Authenticate

Create your free acount.

setCurl()
register(token = "YOUR_TOKEN", email = "YOUR_EMAIL")

1. Data template

months <- as.yearmon(seq(as.Date(Sys.time()), length = 12, by = "-1 month"))
df <- data.frame(months = as.character(rev(months)),
                 `EUR,PLN` = NA,
                 check.names = FALSE, stringsAsFactors = FALSE)

2. Analyze

st  <- analyze(df)

2a. adjust

st  <- adjust(st, id = 1, items = list("class" = "time", "feature" = "month", "format" = "%b %Y"))
st  <- adjust(st, id = 2, items = list("class" = "general", "feature" = NA))
st  <- adjust(st, id = 3, items = list("class" = "general", "feature" = NA))
st  <- adjust(st, column = 2, items = list("class" = "general", "feature" = NA, "provider" = "ECB", "table" = "EXR"))

3. Fill data

rdf <- fill(df, st)
vis(rdf)

3a. Adjust default values

def <- adjust(rdf$default, column = 2, 
              items = list("Frequency" = "M",
                           "Currency" = "PLN",
                           "Currency denominator" = "EUR",
                           "Exchange rate type" = "SP00",
                           "Series variation - EXR context" = "A")) #or "E" depending on transformation

3b. Adjust matching keys

key <- adjust(rdf$keys, column = 2, 
              items = list("id.x" = c(1,2,3),
                           "id.y" = c(6,3,2),
                           "class" = c("time", "general", "general"),
                           "method" = c("time-matching", "value-selection", "value-selection")))

3c. Refill data

rdf <- fill(df, st, default = def, keys = key)