Let’s take a look at, for example, the exchange rate history of the US dollar against the euro. FRED collects this data series on a daily basis under ID DEXUSEU.
The FRED data set has two columns that interest us most: date and value.
## # A tibble: 6 x 3
## date series_id value
## <date> <chr> <dbl>
## 1 2022-02-04 DEXUSEU 1.15
## 2 2022-02-07 DEXUSEU 1.14
## 3 2022-02-08 DEXUSEU 1.14
## 4 2022-02-09 DEXUSEU 1.14
## 5 2022-02-10 DEXUSEU 1.15
## 6 2022-02-11 DEXUSEU 1.14
Now, let’s plot the data. See below.
Let’s
CES0000000001),## [1] "January 2022"
## [1] 467
Let’s grab the most recent inflation data from BLS and graph it. I am interested in
CUUR0000SA0),CUUR0000SETA02),CUUR0000SAF11211).Now, let’s derive and plot the year-on-year changes in the CPI indexes:
## [1] "% year-on-year change of CUUR0000SA0 , All items"
## Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
## 2017 2.50 2.74 2.38 2.20 1.87 1.63 1.73 1.94 2.23 2.04 2.20 2.11
## 2018 2.07 2.21 2.36 2.46 2.80 2.87 2.95 2.70 2.28 2.52 2.18 1.91
## 2019 1.55 1.52 1.86 2.00 1.79 1.65 1.81 1.75 1.71 1.76 2.05 2.29
## 2020 2.49 2.33 1.54 0.33 0.12 0.65 0.99 1.31 1.37 1.18 1.17 1.36
## 2021 1.40 1.68 2.62 4.16 4.99 5.39 5.37 5.25 5.39 6.22 6.81 7.04
## 2022 7.48
## [1] "% year-on-year change of CUUR0000SETA02 , Used cars and trucks"
## Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
## 2017 -3.69 -4.25 -4.66 -4.63 -4.31 -4.30 -4.08 -3.80 -3.75 -2.89 -2.10 -0.99
## 2018 -0.61 -0.09 0.37 -0.91 -1.68 -0.66 0.84 1.25 -1.47 0.43 2.30 1.43
## 2019 1.64 1.11 0.44 0.78 0.28 1.25 1.47 2.08 2.61 1.43 -0.44 -0.68
## 2020 -1.97 -1.33 0.13 -0.75 -0.36 -2.78 -0.88 3.98 10.27 11.54 10.86 10.04
## 2021 9.99 9.29 9.37 20.97 29.74 45.24 41.65 31.90 24.41 26.45 31.44 37.29
## 2022 40.51
## [1] "% year-on-year change of CUUR0000SAF11211 , Meats"
## Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
## 2017 -3.63 -3.02 -2.31 -2.75 -2.20 -0.96 1.10 0.70 0.80 1.54 1.60 2.35
## 2018 2.36 1.49 1.38 2.43 1.42 0.08 -0.74 -0.28 -0.53 -1.20 -0.46 -0.87
## 2019 0.12 0.38 0.16 -0.25 1.62 1.32 1.60 0.76 1.33 2.47 2.49 3.58
## 2020 3.36 3.67 3.25 6.58 11.74 16.71 10.22 8.14 6.79 6.64 6.08 5.20
## 2021 5.53 5.62 5.84 4.00 -0.07 -0.48 5.89 8.62 12.63 14.51 15.97 14.75
## 2022 13.64