Skip to content

Instantly share code, notes, and snippets.

View ivelasq's full-sized avatar

Isabella Velásquez ivelasq

View GitHub Profile
@ivelasq
ivelasq / 2019-05_tidy_tuesday
Last active May 29, 2019 03:20
May 2019 Tidy Tuesday Submission
library(tidyverse)
library(ggridges)
library(viridis)
library(extrafont)
# font_import()
# loadfonts(device = "win")
wine_ratings <-
readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-05-28/winemag-data-130k-v2.csv")
@ivelasq
ivelasq / energy_generation_map
Last active September 28, 2019 20:40
Energy Generation by State, 1990-2017
# https://www.eia.gov/electricity/data/state/
library(tidyverse)
library(readxl)
library(janitor)
library(geofacet)
library(extrafont)
dat <-
read_excel(here::here("data", "annual_generation_state.xls", skip = 1)) %>%
@ivelasq
ivelasq / chicago_crime_ytd
Created August 23, 2019 03:06
Chicago Crime Year-to-Date
# Chicago YTD Crime Data Visualization
# libraries ---------------------------------------------------------------
library(tidyverse)
library(ggmap)
# devtools::install_github('thomasp85/gganimate')
library(gganimate)
library(RSocrata)
library(RColorBrewer)
@ivelasq
ivelasq / ivyplus.R
Created October 18, 2019 02:46
Percentage of Fall Admission Undergraduates in the Ivy Plus that are Black/African American
# libraries ---------------------------------------------------------------
library(tidyverse)
library(brolgar)
library(extrafont)
library(directlabels)
# data ----------------------------------------------------------------------
library(tidyverse)
library(readxl)
library(viridis)
endowments <-
read_excel(here::here("data", "NCSE2017 Endowment Markets Values for Media--Final January 31 2018.xlsx"), skip = 2)
rankings <-
read_csv(here::here("data", "National Universities Rankings.csv"))
library(tidyverse)
library(ggmap)
library(maps)
library(rgdal)
commute_mode <-
readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-11-05/commute.csv")
commute_mode_cities <-
commute_mode %>%
@ivelasq
ivelasq / 2020-01-21_tidy_tuesday
Created January 22, 2020 05:31
2020-01-21 Tidy Tuesday
library(tidyverse)
library(ggbeeswarm)
library(ggdark)
library(showtext)
library(viridis)
spotify_songs <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-01-21/spotify_songs.csv')
spotify_songs %>%
filter(playlist_genre == "pop") %>%
library(tidyverse)
library(ggbeeswarm)
library(viridis)
spotify_songs <-
readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-01-21/spotify_songs.csv')
spotify_songs %>%
filter(playlist_genre == "pop" & track_popularity > 50) %>%
ggplot(aes(x = playlist_subgenre, y = danceability, group = playlist_subgenre, color = playlist_subgenre)) +
@ivelasq
ivelasq / 2020-02-11_tidytuesday
Created February 12, 2020 05:51
2020-02-11 Tidy Tuesday
# TidyTuesday
# February 11, 2020
# load libraries --------------------------------------------------------
library(tidyverse)
library(viridis)
library(lubridate)
# read data -------------------------------------------------------------
# 2020-02-18 Tidy Tuesday
library(tidyverse)
library(rvest)
food_consumption <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-02-18/food_consumption.csv')
url <- "https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population"
population <-