Skip to content

Instantly share code, notes, and snippets.

View Ryo-N7's full-sized avatar

Ryo Nakagawara Ryo-N7

View GitHub Profile
@Ryo-N7
Ryo-N7 / japan_korea_rivalry.r
Last active October 17, 2018 13:25
Japan vs. Korea Soccer Rivalry Graph
library(polite)
library(rvest)
library(dplyr)
library(tidyr)
library(stringr)
library(lubridate)
library(ggplot2)
library(extrafont)
loadfonts() # run once per session
@Ryo-N7
Ryo-N7 / tokyo_annual_temp_barcode_chart.r
Last active August 26, 2018 08:49
Bar Code Chart: Tokyo Annual Average Temperature (1876-2017)
# http://www.climate-lab-book.ac.uk/2018/warming-stripes/
# data from: http://www.data.jma.go.jp/obd/stats/etrn/view/annually_s.php?prec_no=44&block_no=47662
library(ggimage)
library(ggplot2)
library(dplyr)
library(tidyr)
library(purrr)
library(scales)
library(rvest)
@Ryo-N7
Ryo-N7 / jleague_avg_value_age.r
Last active February 15, 2021 16:13
J-League: Average Value vs. Average Age Plot
# saw these types of plots for different leagues on r/soccer
# (originally by Twitter: @fussbALEXperte)
# so thought I'd make my own version using R!
library(rvest)
library(polite)
library(dplyr)
library(tidyr)
library(purrr)
library(ggplot2)
@Ryo-N7
Ryo-N7 / japan_sf_transition_animation.r
Last active August 21, 2018 13:54
Japan sf transitions animation
original viz link: https://gist.github.com/thomasp85/c36ab5cfe387dec9d5e99a85a776bfa0
# try to do above but with Japan instead!
library(gganimate)
library(cartogram)
library(geogrid) # devtools::install_github("jbaileyh/geogrid") >>> for sf support!
library(rnaturalearth)
library(sf)
library(scico)
@Ryo-N7
Ryo-N7 / tokyo_summer_temperature_heatmap.r
Last active August 19, 2018 03:28
Tokyo's historical summer temperature (heatmap) - original from Toyo Keizai Online
library(ggplot2)
library(dplyr)
library(tidyr)
library(purrr)
library(jsonlite)
library(lubridate)
library(magrittr)
library(scales)
library(stringr)
library(extrafont)
@Ryo-N7
Ryo-N7 / liverpool_age_utility.rmd
Last active February 14, 2022 15:49
Liverpool FC's Age-Utility Graph
## Packages
```{r}
library(rvest)
library(polite) # devtools::install_github("dmi3kno/polite")
library(dplyr)
library(tidyr)
library(ggplot2)
library(scales)
library(purrr)