Skip to content

Instantly share code, notes, and snippets.

library(text)
library(tidyverse)
textrpp_install()
textrpp_initialize()
earnings_call_text <- "But we were very conscious that we wanted the skills back, we wanted the people back. And pleasingly, on pilots, on engineers, we - and a lot of our international cabin crew, we've gotten people back, they haven't been lost. We've had an issue with Jetstar cabin crew where people have gone on to other professions, and we've been retraining and recruiting in that space. But our biggest issue has been on head office staff where we've gotten big turnovers of people in some areas like the technology area."
pre_defined_topics <- c("hiring difficulties",
@MattCowgill
MattCowgill / pavement.R
Created November 9, 2023 00:02
Wowee Zowee
# Reproduce: https://www.deniselu.com/sandbox/pavement-1933-2023/
library(jsonlite)
library(tidyverse)
library(showtext)
sysfonts::font_add_google("Fira Sans")
showtext_auto()
library(readabs)
library(tidyverse)
library(fpp3)
library(gganimate)
lfs_d_t1 <- read_abs("6291.0.55.001", "1")
emp_pop_age_sex <- lfs_d_t1 |>
filter(str_detect(series,
"Employment to population ratio"),
library(fredr)
library(tidyverse)
library(ggdirectlabel) # remotes::install_github("mattcowgill/ggdirectlabel")
# You must have a FRED API key;
# see http://sboysel.github.io/fredr/articles/fredr.html
us_cpi <- fredr("CPIAUCSL")
us_sent <- fredr("UMCSENT") |>
library(tidyverse)
library(gtrendsR)
inf <- gtrends(
keyword = "inflation",
geo = c("AU", "US"),
onlyInterest = TRUE) %>%
magrittr::extract2("interest_over_time") %>%
dplyr::as_tibble() %>%
dplyr::mutate(date = as.Date(date))
library(readabs)
library(tidyverse)
library(readxl)
theme_set(theme_minimal() +
theme(panel.grid = element_blank(),
axis.ticks = element_line(),
axis.line.x = element_line()))
eeh_path <- download_abs_data_cube("employee-earnings-and-hours-australia",
library(tidyverse)
library(readrba)
library(readabs)
library(patchwork)
theme_set(theme_minimal(base_size = 14) +
theme(
axis.title = element_blank(),
axis.line.x = element_line(linewidth = 0.25),
axis.ticks.x = element_line(linewidth = 0.25),
library(tidyverse)
library(readabs)
pop_raw <- read_abs_series(c("A84595514A",
"A84595604F")) |>
select(date, series, value)
pop_raw |>
separate_series(c("geog", "indicator", "sex")) |>
filter(date >= ymd("2019-01-01")) |>
library(tidyverse)
library(readxl)
library(lubridate)
dl_file <- function(date) {
month_year <- format(date, "%b-%Y") |>
tolower()
file_format <- if_else(date <= ymd("2021-03-01"),
".xls",
library(tidyverse)
library(readabs)
# This data contains groups, sub-groups, and expenditure classes
cpi_t13 <- read_abs("6401.0", "13")
# Fetch a list of expenditure classes, as we want to filter to just those
cpi_t14 <- read_abs("6401.0", 14)
exp_classes <- cpi_t14 |>