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
# Du Bois Challenge | |
# TidyTuesday 2021 week 8 | |
# Rebecca Stevick updated 2/16/2021 | |
devtools::install_github("ropensci/rnaturalearthhires") | |
# Load libraries ----------------- | |
library(tidyverse) | |
library(sf) | |
library(rnaturalearth) | |
states <- ne_states(country = 'United States of America', returnclass = "sf") %>% |
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
#https://github.com/sianbladon/Data-Viz/blob/master/30%20Day%20Chart%20Challenge%202021/Day%205%20-%20slope/day_5.R | |
library(tidyverse) | |
library(showtext) | |
font_add_google("Montserrat", "Montserrat") | |
showtext_auto() | |
options(theme_bw()) | |
saaq2013 <- read_csv("data/downloads/vehicules-circulation-2013.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(tidyverse) | |
library(cancensus) | |
library(sf) | |
library(stringr) | |
library(mapview) | |
#options(cancensus.api_key = "your_api_key") | |
#options(cancensus.cache_path = "custom cache path") | |
list_census_regions('CA16') %>% | |
filter(level == "CMA", name %in% c("Vancouver","Toronto")) |
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(mapview) | |
library(sf) | |
library(tidyverse) | |
library(pdftools) | |
library(tabulizer) | |
library(tesseract) | |
library(janitor) | |
library(stringr) | |
library(cancensus) | |
library(sf) |
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(magrittr) | |
library(dplyr) | |
library(sf) | |
#devtools::install_github("mountainMath/tongfen") | |
library(tongfen) | |
library(cancensus) | |
library(tidygeocoder) | |
get_utm_crs <- function(longitude){ 32600 + ceiling((longitude - -180)/ 6)} # pour calculer des buffers ronds en mètres comme dans le day 5 de https://gitlab.com/dickoa/30daymapchallenge/-/blob/master/day5/day5-blue.R |
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
#https://www.katiejolly.io/blog/2020-03-21/water-lines | |
library(sf) # spatial data | |
library(tidyverse) # wrangling/cleaning | |
library(colorspace) # for lightern() | |
library(showtext) # google fonts | |
library(osmdata) # to get shapes | |
library(polylabelr) # to get pole of inacessibility (point furthest from any edge, to give us an idea of the distance between water lines) | |
library(purrr) # to add a bunch of buffer lines automatically | |
font_add_google("Assistant", regular.wt = 300) |