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(sf) | |
| library(terra) | |
| library(stars) | |
| library(ggspatial) | |
| library(systemfonts) | |
| library(patchwork) | |
| register_variant( | |
| name = "Input Mono Light", |
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
| ## packages | |
| library(ggplot2) | |
| library(dplyr) | |
| library(tidyr) | |
| library(ggbraid) | |
| library(colorspace) | |
| library(owidR) | |
| # plus ggtext via namespace | |
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) | |
| value <- 7.3 | |
| ggplot() + | |
| # Add gap to bottom | |
| coord_radial( | |
| start = 4/3 * pi, # 240° | |
| end = 2/3 * pi, # 120° | |
| expand = FALSE |
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) | |
| library(patchwork) | |
| # get photo | |
| img <- magick::image_read("https://www.yan-holtz.com/img/team/YH_pic_square.png") | |
| # retrieve lightness | |
| c <- magick::image_channel(img) | |
| img_df <- tibble::as_tibble(as.data.frame.table(drop(as.integer(c[[1]])))) | |
| img_df <- dplyr::mutate(img_df, across(c(Var1, Var2), as.numeric)) |
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) | |
| library(treemapify) | |
| library(ggtext) | |
| library(prismatic) | |
| owid_urban <- readr::read_csv("https://www.ggplot2-uncharted.com/data/hyde.csv") | |
| treemap <- owid_urban |> | |
| sf::st_drop_geometry() |> | |
| filter(!is.na(continent)) |> |
OlderNewer