Skip to content

Instantly share code, notes, and snippets.

@mtmx
mtmx / rayographie_cadastre.R
Created September 20, 2020 17:28
Cartes du bati et des parcelles cadastrales avec un rendu inspiré des rayographes
library(tidyverse)
library(data.table)
library(sf)
#### liste des stades (ou d'autres points d'interet)
liste_stades <- tribble(
~poi,~x,~y, ~col_1, ~col_2,
"Vélodrome" , 894600 , 6244146, "#0098d4","#be945c",
"Geoffroy Guichard" , 808638 , 6485545, "#009337","#cddbcc",
"Saint Symphorien" , 930636 , 6894610, "#6d1619","#e2cecd",
@mtmx
mtmx / nemo_bistrots.R
Created July 31, 2019 16:56
Point le plus éloigné d'un bistrot
library(data.table)
library(tidyverse)
library(sf)
library(rmapshaper)
# contours france
frmet <- st_read("https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson") %>%
st_transform(2154) %>%
summarise() %>%
ms_simplify(keep = 0.01)
@mtmx
mtmx / rayshader_anim.R
Created August 15, 2018 08:26
Carte stylisée d'un MNT avec gif animé
library(devtools)
#install_github("tylermorganwall/rayshader")
library(rayshader)
library(magrittr)
library(tidyverse)
library(sf)
library(raster)
library(rgeos)
library(rgl)
library(rgdal)
@mtmx
mtmx / dorlingramize.R
Last active March 27, 2018 18:25
dorlingramize
# chargement librairies ####
library(rnaturalearth)
library(tidyverse)
library(sf)
library(data.table)
library(packcircles)
library(janitor)
library(readxl)
library(rmapshaper)
@mtmx
mtmx / cote_moyenne_l1.R
Created February 17, 2018 08:47
cote moyenne des résultats des clubs de ligue 1
# chargement librairies
library(tidyverse)
library(data.table)
library(stringr)
# doc
http://www.football-data.co.uk/notes.txt
# fonction pour télécharger fichiers par saison
import <- function(saison) {
@mtmx
mtmx / MSalmon_meteo_EU.R
Created November 19, 2017 10:08
Source Maelle Salmon : graphique des villes européennes par températures été/hiver
#########################
# http://www.masalmon.eu/2017/11/16/wheretoliveus/
# version FR
# liste des aéroports de France
library("rvest")
library(tidyverse)
library(magrittr)
library(stringr)
@mtmx
mtmx / cartes_BDCOM.R
Last active October 27, 2017 11:24
Carte des commerces parisiens par type d'activité
## chargement des libraires
library(tidyverse)
library(magrittr)
library(sf)
library(readxl)
library(data.table)
library(janitor)
library(stringr)
library(scales)