The earlier example of this brushable radial chart led to some feedback to make the filtering better. I introduced a #circularBrush.filter(array,accessor) that takes an array of data and and accessor for that data and returns to you the data that falls into the area of the brush. The functionality of this chart is no different than the other, but if you take a look at the code, it's much more efficient.
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(duckdb) | |
library(DBI) | |
# création de la BDD en mémoire | |
connexion <- dbConnect(drv = duckdb(), dbdir=":memory:") | |
# Création d'une vue correspondant au fichier (csv ici) | |
dbExecute(connexion, statement = "CREATE VIEW matable AS SELECT * FROM 'stations.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
myQuery <- "node['natural'='tree'](50.4353,4.8307,50.4788,4.9018);out;" | |
myJSONQuery <- curl::curl_escape(paste("[out:json];", myQuery, sep="")) | |
myURL <- paste("https://overpass-api.de/api/interpreter?data=", myJSONQuery, sep = "") | |
myURL | |
rawJson <- jsonlite::fromJSON(myURL) | |
json_data <- rawJson %>% | |
purrr::pluck("elements") | |
sf_data <- json_data %>% |
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
STATEFP | COUNTYFP | COUNTYNS | NAME | NAMELSAD | TOT_POP | areakm2 | densitekm2 | |
---|---|---|---|---|---|---|---|---|
31 | 039 | 00835841 | Cuming | Cuming County | 8940 | 1488.3432196816361 | 6.006679025226661 | |
53 | 069 | 01513275 | Wahkiakum | Wahkiakum County | 4426 | 742.5452485698621 | 5.960579518250841 | |
35 | 011 | 00933054 | De Baca | De Baca County | 1781 | 6045.909576780487 | 0.2945793312622452 | |
31 | 109 | 00835876 | Lancaster | Lancaster County | 317272 | 2192.1201123408173 | 144.7329451583776 | |
31 | 129 | 00835886 | Nuckolls | Nuckolls County | 4195 | 1491.3637168744444 | 2.812861780486222 | |
72 | 085 | 01804523 | Las Piedras | Las Piedras Municipio | NA | 87.78087137695171 | NA | |
46 | 099 | 01265772 | Minnehaha | Minnehaha County | 192876 | 2107.8901870150967 | 91.50192035056835 | |
48 | 327 | 01383949 | Menard | Menard County | 2139 | 2336.8517291110265 | 0.9153340682053918 | |
06 | 091 | 00277310 | Sierra | Sierra County | 2987 | 2491.993948322783 | 1.1986385448529586 |
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
BEGIN:VCALENDAR | |
VERSION:2.0 | |
PRODID:Robin | |
X-WR-CALNAME:Horaires Marées Herbaudière 2020-2021 | |
NAME:Horaires marées Herbaudière 2020-2021 | |
BEGIN:VEVENT | |
UID:[email protected] | |
DTSTAMP:20200420T200000 | |
DTSTART:20200101 | |
SUMMARY:BM: 02h33 (NA) / 14h56 (56) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
% ###### CREATION D'ENCADRES ###### % | |
% Encadré pris dans la thèse de Seb Rey | |
\usepackage[most]{tcolorbox} | |
\newtcbtheorem[number within=chapter]{encadre}{Encadré}{ | |
outer arc=0pt, | |
arc=0pt, | |
breakable, | |
enhanced, | |
colback=white, |
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(sf) | |
# Create the base circle polygon | |
circle <- st_geometry(st_point(c(1E6,1E6))) %>% | |
st_sfc(crs = 2154) %>% | |
st_buffer(dist = 1000) | |
# Create regularly spaced points around polygon | |
perim_points <- circle %>% | |
st_cast("LINESTRING") %>% |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
svg { | |
font: 12px sans-serif; | |
} | |
.background path { | |
fill: none; |
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
# Connexion à la BDD PostgreSQL | |
library(DBI) # Package générique pour la connexion à des BDD | |
library("RPostgreSQL") # Package apportant les drivers pour PostgreSQL | |
driver <- dbDriver("PostgreSQL") | |
con <- DBI::dbConnect(drv = driver, | |
host = "ip de la BDD", | |
port = "port de la BDD", |
NewerOlder