Skip to content

Instantly share code, notes, and snippets.

View SimonCoulombe's full-sized avatar

Simon Coulombe SimonCoulombe

View GitHub Profile
# some notes on installing minecraft to follow along the book.
# raspberryJuice is not updated anymore (stops at minecraft 1.12 or something)
# I got JuicyRaspberryPi instead.
# installation instructions here:
# https://github.com/wensheng/JuicyRaspberryPie/blob/master/doc/using-api-spigot.md
# steps that worked for me:
# Installed Java SDK 17 (exactly 17, not more, not less). Got it from adoptium:
@SimonCoulombe
SimonCoulombe / .gitignore
Last active January 10, 2023 17:49
.gitignore for R
.DS_Store
*.html
core*
*.png
# History files
.Rhistory
.Rapp.history
@SimonCoulombe
SimonCoulombe / shiny_mtcars_list_button_solved.R
Created January 9, 2022 18:15
this works! the list is not a reactive because of the button.
library(shiny)
library(shinyWidgets)
library(dplyr)
mod_filterDataInputMPG_ui <- function(id){
ns <- NS(id)
shinyWidgets::numericRangeInput(
inputId = ns("mpg_range"),
label = "mpg_range",
value = c(0, 99)
)
library(shiny)
library(shinyWidgets)
library(dplyr)
mod_filterDataInputMPG_ui <- function(id){
ns <- NS(id)
shinyWidgets::numericRangeInput(
inputId = ns("mpg_range"),
label = "mpg_range",
value = c(0, 99)
)
library(shiny)
library(shinyWidgets)
library(dplyr)
mod_filterDataInputMPG_ui <- function(id){
ns <- NS(id)
shinyWidgets::numericRangeInput(
inputId = ns("mpg_range"),
label = "mpg_range",
value = c(0, 99)
)
library(shiny)
library(shinyWidgets)
library(dplyr)
mod_filterDataInputMPG_ui <- function(id){
ns <- NS(id)
shinyWidgets::numericRangeInput(
inputId = ns("mpg_range"),
label = "mpg_range",
value = c(0, 99)
)
#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)
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
library(mapview)
library(sf)
library(tidyverse)
library(pdftools)
library(tabulizer)
library(tesseract)
library(janitor)
library(stringr)
library(cancensus)
library(sf)
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"))