This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(sf) | |
library(rnaturalearthdata) | |
countries110 %>% | |
st_as_sf() %>% | |
st_transform(crs = 3857) %>% | |
ggplot() + | |
geom_sf() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(hrbrthemes) | |
#> NOTE: Either Arial Narrow or Roboto Condensed fonts are required to use these themes. | |
#> Please use hrbrthemes::import_roboto_condensed() to install Roboto Condensed and | |
#> if Arial Narrow is not on your system, please see https://bit.ly/arialnarrow | |
# rebuilding https://blog.albertkuo.me/post/point-shape-options-in-ggplot/#fnref1 | |
pch_tib <- tibble( | |
pch_number = 0:25, | |
pch_description = c(rep("Outline", 15), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
survey_data <- tribble( | |
~id, ~group, ~question, ~response, | |
1, "A", "Do you think survey questions tend to be too long?", "Strong agree", | |
2, "B", "Do you think survey questions tend to be too long?", "Agree", | |
3, "C", "Do you think survey questions tend to be too long?", "Strong agree", | |
4, "A", "Do you like answering surveys, in general?", "Strong disagree", | |
5, "B", "Do you like answering surveys, in general?", "disagree", | |
6, "C", "Do you like answering surveys, in general?", "Strong agree", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Report on animals" | |
output: html_document | |
date: '2022-05-19' | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set( | |
echo = FALSE, | |
message = FALSE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data_2020 <- tibble( | |
id = 1:4, | |
wk1 = c(1, "-", NA, 4), | |
wk2 = c(1, "-", 3, 4) | |
) | |
data_2021 <- tibble( | |
id = 1:4, | |
wk1 = c(1, NA, 3, 4), | |
wk2 = c(1, 2, 3, 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(janitor) | |
library(readxl) | |
download.file(url = "https://github.com/rfortherestofus/going-deeper/raw/master/data-raw/enrollment-18-19.xlsx", | |
mode = "wb", | |
destfile = "data-raw/enrollment-18-19.xlsx") | |
download.file(url = "https://github.com/rfortherestofus/going-deeper/raw/master/data-raw/enrollment-17-18.xlsx", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(readxl) | |
library(janitor) | |
survey_monkey_raw <- read_excel("data/survey-monkey-data.xlsx") %>% | |
clean_names() | |
survey_monkey_data <- survey_monkey_raw %>% | |
slice(-1) %>% | |
mutate(respondent_id = row_number()) %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(palmerpenguins) | |
make_penguin_scatter_avoid_tidyeval <- function(facet_variable){ | |
penguins_tidy <- penguins %>% | |
select(bill_length_mm, bill_depth_mm, all_of(facet_variable)) %>% | |
rename_with(.cols = 3, ~"thing_to_facet_by") | |
penguins_tidy %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(scales) | |
library(ggalt) | |
library(hrbrthemes) | |
library(ggrepel) | |
library(showtext) | |
library(ggtext) | |
# get coords from image --------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "MLCF Success" | |
subtitle: "Conservation Success" | |
author: "Dascot Limited" | |
date: "`r Sys.Date()`" | |
output: | |
pagedreport::paged_windmill: | |
logo: "Dascot_Logo.png" | |
toc: true | |
--- |