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
| ### Load packages ------------------------------------------------------------- | |
| library(tidyverse) # General-purpose cleaning | |
| library(janitor) # For the clean_names() function | |
| ### Import data --------------------------------------------------------------- | |
| hbcu_all <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-02-02/hbcu_all.csv') %>% | |
| # clean_names() converts field names to snake_case | |
| clean_names() | |
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
| ### Load libraries | |
| library(tidyverse) | |
| ### Load data | |
| hike_data_raw <- read_rds(url('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-11-24/hike_data.rds')) | |
| ### Clean hike_data | |
| hike_data <- hike_data_raw %>% | |
| # De-duplicate Cap Sante Park | |
| distinct(name, location, .keep_all = TRUE) %>% |
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
| ### Load libraries | |
| library(dplyr) # For data manipulation | |
| library(readr) # For reading CSV and parsing numbers | |
| library(ggplot2) # For graphing | |
| library(ggthemes) # For ggplot2 theme_map() | |
| library(gganimate) # For animation | |
| ### Import data | |
| ### https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-10-27/readme.md | |
| wind_turbine <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-10-27/wind-turbine.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
| library(ggplot2) # For graphing | |
| library(mapproj) # For the polar orthographic map projection | |
| library(ggthemes) # For theme_map() | |
| # Get geospatial data for Antarctica only | |
| antarctica <- map_data("world", region = "Antarctica") | |
| ggplot(antarctica, aes(long, lat, group = group)) + | |
| geom_polygon(fill = "#506B8E") + | |
| # This is where the magic happens |