This file contains hidden or 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(lubridate) | |
library(patchwork) | |
library(ggrepel) | |
library(ggthemes) | |
spotify_songs <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-01-21/spotify_songs.csv') | |
arrow <- tibble(x1 = 25, x2 = 12, y1 = 320, y2 = 331.5) |
This file contains hidden or 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(mapdata) | |
library(ggthemes) | |
library(patchwork) | |
# read in various data files | |
rainfall <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-01-07/rainfall.csv') | |
temperature <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-01-07/temperature.csv') | |
nasa_fire <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-01-07/MODIS_C6_Australia_and_New_Zealand_7d.csv') |
This file contains hidden or 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
set.seed(1234) | |
a <- seq(1:20) | |
b <- a + runif(20, 0, .25) | |
my_data <- as.data.frame(c(a, b)) | |
my_model <- lm(a ~ b, data = my_data) | |
summary(my_model) |
This file contains hidden or 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
# Note, not all of these libraries are needed for the code below | |
library(tidyverse) | |
library(openintro) | |
library(ggthemes) | |
library(ggmap) | |
library(maps) | |
library(mapdata) | |
library(ggrepel) | |
library(patchwork) |
This file contains hidden or 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(ggthemes) | |
cran_code <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-11-12/loc_cran_packages.csv") | |
# Plot 1 #### | |
cran_code %>% | |
group_by(language) %>% | |
summarise(n = n()) %>% | |
arrange(-n) %>% |
This file contains hidden or 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(rtweet) | |
library(tidytext) | |
library(grid) | |
library(igraph) | |
library(ggraph) | |
library(stringi) | |
library(leaflet) | |
library(ggthemes) |
This file contains hidden or 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
# Greenwich Village and Soho Top 5 Pizza Restaurants | |
library(tidyverse) | |
library(leaflet) | |
pizza_barstool <- read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-10-01/pizza_barstool.csv") | |
zip_list <- c(10012, 10013, 10014) | |
ready_to_plot <- pizza_barstool %>% | |
filter(zip %in% zip_list) %>% |
This file contains hidden or 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(rtweet) | |
library(tidytext) | |
library(grid) | |
library(igraph) | |
library(ggraph) | |
library(stringi) | |
library(leaflet) | |
library(ggthemes) |
This file contains hidden or 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(gganimate) | |
source("https://gist.githubusercontent.com/ajstewartlang/6c4cd8ab9e0c27747424acdfb3b4cff6/raw/fb53bd97121f7f9ce947837ef1a4c65a73bffb3f/geom_flat_violin.R") | |
set.seed(3) | |
all_data <- NULL | |
sample_size <- 500 | |
for(sample in 1:10) { |
This file contains hidden or 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(countrycode) | |
library(ggthemes) | |
mismanaged_vs_gdp <- read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-05-21/per-capita-mismanaged-plastic-waste-vs-gdp-per-capita.csv") | |
mismanaged_vs_gdp <- clean_names(mismanaged_vs_gdp) | |
mismanaged_vs_gdp$continent <- countrycode(sourcevar = mismanaged_vs_gdp$entity, | |
origin = "country.name", | |
destination = "continent") |
NewerOlder