Skip to content

Instantly share code, notes, and snippets.

@jkr216
jkr216 / gist:38536818aa7bd3fb2fe4c1284c1f5de8
Created November 11, 2023 18:12
GDP Nowcast v. 10-yrs
# Inspired by the work of Rich Falk-Wallace
library(tidyverse)
library(tidyquant)
library(timetk)
library(readxl)
library(plotly)
library(scales)
library(formattable)
```{r, include = FALSE}
library(XML)
library(tidyverse)
library(tidyquant)
library(timetk)
library(readxl)
library(plotly)
library(scales)
library(fredr)
library(Quandl)
@jkr216
jkr216 / gist:f5de545680522d7f4356bf8d49353783
Created March 16, 2023 23:25
core goods and core services chart
```{r include = FALSE}
library(tidyverse)
library(tidyquant)
library(timetk)
library(readxl)
library(plotly)
library(scales)
library(formattable)
library(fredr)
library(gt)
@jkr216
jkr216 / gist:a505c40e3716119fe2e96c94cc50f30c
Created March 13, 2023 23:35
miller labor slack index
```{r, include = FALSE}
library(tidyverse)
library(tidyquant)
library(timetk)
library(scales)
library(fredr)
library(gt)
library(gtExtras)
library(janitor)
@jkr216
jkr216 / gist:73ce484e200f74befdc2436810454a43
Last active March 24, 2023 20:50
FOMC meeting dates, rate changes, scrape with R code
### Setup
```{r, include = FALSE}
library(tidyverse)
library(tidyquant)
library(timetk)
library(scales)
library(janitor)
```{r, setup}
library(tidyverse)
library(timetk)
library(tidyquant)
library(readxl)
library(janitor)
library(gt)
library(gtExtras)
library(priceR)
library(scales)
### Packages and setup
```{r setup, include=FALSE}
library(tidyverse) # the fundamentals
library(lubridate) # working with dates
library(timetk) # time series Swiss Army Knife, not used today but worth a look
library(tidyquant) # great finance functions and FRED importer
library(readxl)
library(scales)
@jkr216
jkr216 / gist:53f9b7217134e04271f1b11e21398bd1
Created July 23, 2022 18:53
Living arrangements 25 - 34
library(tidyverse)
library(timetk)
library(tidyquant)
library(readxl)
library(janitor)
url <- "https://www2.census.gov/programs-surveys/demo/tables/families/time-series/adults/ad3-25-34.xls"
destfile <- "ad3_25_34.xls"
curl::curl_download(url, destfile)
read_excel(destfile, skip = 7) %>%
slice(1:56) %>%
fed_assets_on_bs <-
"WALCL" %>%
tq_get(get = "economic.data") %>%
summarise_by_time(
.date_var = date,
.by = "months",
monthly_assets = mean(price)
)
```{r}
library(tidyverse)
library(tidyquant)
library(timetk)
library(readxl)
library(plotly)
library(scales)
library(formattable)
library(fredr)
library(broom)