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
<?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> |
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(microbenchmark) | |
library(wakefield) | |
simulated_df <- r_data_frame( | |
n=10000000, | |
id, | |
r_series(race, 30, name = "myfactor" ), | |
r_series(dob, 30, name = "date"), | |
r_series(iq, 30, name = "double") |
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
# titanic data wrangling from https://rstudio-pubs-static.s3.amazonaws.com/324727_11ac0b6dbc77464da7b9de8c0f347463.html | |
# IMPORTANT: Only objectives 'binary:logistic', 'reg:linear', 'reg:logistic', 'binary:logitraw' are supported yet. | |
library(titanic) # data | |
library(tidypredict) # convert model to sql string | |
library(dummies) | |
library(dplyr) | |
library(dbplyr) |
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
require(tidyverse) | |
ex.df <- data.frame(x=seq(from= -70.5813 , to= -70.36120, length.out=100), | |
y=seq(from= 47.80355 , to= 47.96210, length.out=100)) | |
elev_raster <- elevatr::get_elev_raster( | |
ex.df, | |
prj = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", | |
z = 10, | |
clip = "bbox") |
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
#plot shark telemetry in lake | |
# https://rdrr.io/github/vinayudyawer/KUD3D/f/README.md | |
sapply(c("ks", | |
"rgl", | |
"raster", | |
"tidyverse", | |
"lubridate", | |
"sf", | |
"rayshader", |
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
#ça c'est mon programme où j'essaie de modifier le package mlr pour qu'il prenne base_margin | |
# comme option | |
library(xgboost) | |
library(insuranceData) # example dataset https://cran.r-project.org/web/packages/insuranceData/insuranceData.pdf | |
library(tidyverse) | |
#install.packages("mlr") | |
library(mlr) | |
set.seed(1234) | |
data(dataCar) |
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
#idée : https://pudding.cool/2018/12/3d-cities-story/index.html | |
# how to https://docs.google.com/document/d/1Us_1QBHShdMe8-laKhGh_mjkXxOw-74-9mxJAx_DvKE/edit | |
# GHS population grid 2015 aux 250m téléchargé ici | |
#https://ghslsys.jrc.ec.europa.eu/datasets.php#2016public | |
# alternative à 100m vs 100 m ,world pop , mais pas canada :A http://www.worldpop.org.uk/data/get_data/ | |
# comment importer un raster- https://geocompr.robinlovelace.net/read-write.html |
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
# rayshader.com | |
#sudo apt-get install libfftw3-dev libtiff5-dev | |
#sudo apt-get install libcairo2-dev | |
#sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev | |
# install.packages("tiff") | |
# sudo R , install.packages("rgl") | |
#devtools::install_github("tylermorganwall/rayshader") | |
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
system("bash src/get_blob_data.sh") |
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
## install rtweet from CRAN | |
install.packages("rtweet") | |
## load rtweet package | |
library(rtweet) | |
create_token( | |
app = "my_twitter_research_app", | |
consumer_key = Sys.getenv("twitter_consumer_key"), | |
consumer_secret = Sys.getenv("twitter_consumer_secret"), | |
access_token = Sys.getenv("twitter_access_token"), |