Skip to content

Instantly share code, notes, and snippets.

View SimonCoulombe's full-sized avatar

Simon Coulombe SimonCoulombe

View GitHub Profile
# 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") %>%
library(tidyverse)
library(ggtext)
library(patchwork)
test <- read_csv(
paste0("https://www.donneesquebec.ca/recherche/dataset/",
"97fb0d09-d653-4365-be7e-a0e5e95c7641/resource/",
"eabc1984-5a0f-48f6-9f5c-bb96903df1a2/download/",
"stationnement-palais-des-congres-mtl.csv")
test2 <- test %>%
#http://www.intactforests.org/data.ifl.html
library(osmdata)
library(mapview)
library(spData)
library(sf)
library(tidyverse)
library(conflicted)
R package here:
https://github.com/SimonCoulombe/covidtwitterbot
library(tidyverse)
library(aws.s3)
groupes <- c(
"Ensemble du Québec",
"01 Bas-Saint-Laurent",
"02 Saguenay-Lac-Saint-Jean",
"03 Capitale-Nationale",
"04 Mauricie et Centre-du-Québec",
get_github_file_commit_date <- function(repo, filepath){
url <- paste0("https://api.github.com/repos/",
repo,
"/commits?path=",
gsub("/", "/%2F", filepath),
"&page=1&per_page=1")
request <- httr::GET(url, httr::user_agent("httr"))
content <- httr::content(request)
content[[1]]$commit$committer$date
FROM openjdk:8-jdk
ENV JAVA_OPTS "-server -Xconcurrentio -Xmx1g -Xms1g -XX:+UseG1GC -Ddw.server.application_connectors[0].bind_host=0.0.0.0 -Ddw.server.application_connectors[0].port=8989"
RUN mkdir -p /data && mkdir -p /graphhopper
# install node - only required for JS UI
RUN apt-get install -y wget \
&& curl -sL https://deb.nodesource.com/setup_13.x | bash - \
&& apt-get install -y nodejs
@SimonCoulombe
SimonCoulombe / config-bike.yml
Last active February 27, 2020 02:58
graphhopper configuration file with both bike and car
graphhopper:
# OpenStreetMap input file PBF or XML, can be changed via command line -Ddw.graphhopper.datareader.file=some.pbf
datareader.file: ""
# Local folder used by graphhopper to store its data
graph.location: graph-cache
##### Vehicles #####
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="Graphhopper version 1.0" version="1.1" xmlns:gh="https://graphhopper.com/public/schema/gpx/1.1">
<metadata><copyright author="OpenStreetMap contributors"/><link href="http://graphhopper.com"><text>GraphHopper GPX</text></link><time>2020-01-29T03:07:15Z</time></metadata>
<trk><name>pouet.gpx</name><trkseg>
<trkpt lat="45.506923" lon="-73.577478"><time>2020-01-29T03:07:15Z</time></trkpt>
<trkpt lat="45.50745" lon="-73.578551"><time>2020-01-29T03:07:21Z</time></trkpt>
<trkpt lat="45.507841" lon="-73.578176"><time>2020-01-29T03:07:25Z</time></trkpt>
<trkpt lat="45.50808" lon="-73.577947"><time>2020-01-29T03:07:27Z</time></trkpt>
<trkpt lat="45.508456" lon="-73.577586"><time>2020-01-29T03:07:31Z</time></trkpt>
<trkpt lat="45.50859" lon="-73.577458"><time>2020-01-29T03:07:32Z</time></trkpt>
<trkpt lat="45.508924" lon="-73.577137"><time>2020-01-29T03:07:
<?xml version="1.0"?>
<gpx version="1.1" creator="pgirbric">
<trk>
<name>pouet.gpx</name>
<trkseg>
<trkpt lat="45.5069" lon="-73.57748">
<ele></ele>
</trkpt>
<trkpt lat="45.50692" lon="-73.57751">
<ele></ele>