Skip to content

Instantly share code, notes, and snippets.

---
title: "dash"
output: flexdashboard::flex_dashboard
runtime: shiny
---
```{r setup, include=FALSE}
library(tidyverse)
library(shinyWidgets)
---
title: "dash"
output: flexdashboard::flex_dashboard
runtime: shiny
---
```{r setup, include=FALSE}
library(tidyverse)
library(googlesheets4)
library(tidyverse)
library(gmailr)
# authorise gmailr
search_term <- "from:(jobmail@s.seek.com.au) new jobs for tableau in Melbourne"
messageIDs <- messages(search = search_term, num_results = 5)
my_messages <- tibble(messageIDs) %>%
mutate(downloaded_data = map(messageIDs, ~.x$messages %>%
library(tidyverse)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
countries <- c("AE", "AF", "AN", "AO", "AR", "AS", "AT", "AU", "BB", "BD",
"BE", "BF", "BH", "BM", "BN", "BR", "BY", "CA", "CH", "CL", "CN",
"CO", "CR", "CZ", "DE", "DK", "DZ", "EC", "EE", "EG", "ES", "ET",
"FI", "FO", "FR", "GA", "GB", "GE", "GH", "GI", "GR", "GT", "HK",
"HN", "HR", "HU", "ID", "IE", "IL", "IN", "IR", "IS", "IT", "JM",
"JO", "JP", "KE", "KH", "KR", "KW", "KZ", "LA", "LB", "LK", "LT",
"LU", "LV", "MA", "MN", "MO", "MT", "MU", "MX", "MY", "NG", "NI",
search_data_frame <- completed %>%
filter(country == "AU",
certificate_name == "Tableau Desktop Certified Associate") %>%
distinct(Full_name) %>%
mutate(search_terms = paste("LINKEDIN", Full_name, sep = " "),
search_url = paste("https://www.google.com.au/search?q=", gsub(" ", "+", search_terms), sep = "")) %>%
mutate(urls = map(search_url, ~ xml2::read_html(.x) %>%
rvest::html_nodes(xpath='//h3/a') %>%
rvest::html_attr('href') %>%
strsplit(.[as.vector(grep("url",.))], split = "&") %>%
---
title: "dash"
output: flexdashboard::flex_dashboard
runtime: shiny
---
```{r setup, include=FALSE}
library(tidyverse)
library(lubridate)
library(plotly)
```
radioButtons("brand",
"brand:",
choices = c("All", unique(candyData$Brand)),
selected = "All")
radioButtons("candy_name",
"candy_name:",
choices = c("All", unique(candyData$Candy)),
selected = "All")
header_cells <- c("SEEK Job Mail",
"Hi Julian",
"tableau in Melbourne",
"posted yesterday match your Saved Search:",
"new jobs. Update your SEEK Profile",
"Manage your Saved Searches and subscription preferences",
"https://www.seek.com.au/my-activity/saved-search",
"SEEK Profile Link",
"Update your SEEK Profile")
prep_for_chart <- function(data) {
data %>%
arrange(response_rank) %>%
group_by(question, response_rank_type) %>%
mutate(lead1 = lead(sum_of_value),
lead2 = lead(sum_of_value, 2),
lag1 = lag(sum_of_value),
lag2 = lag(sum_of_value,2)) %>%
ungroup() %>%
get_data_ready <- function(data) {
data %>%
mutate(response_rank = as.numeric(response)) %>%
mutate(total_levels = length(response_values),
levels_are_even = length(response_values) %% 2 == 0,
middle_level = if_else(!levels_are_even, ceiling(length(response_values)/2), NULL)) %>%
mutate(response_rank_type = if_else(!levels_are_even,