Skip to content

Instantly share code, notes, and snippets.

View pachevalier's full-sized avatar

Paul-Antoine pachevalier

  • Paris
View GitHub Profile
library("banR")
library("dplyr")
table_test <- tibble::tibble(
x = c("39 quai André Citroën", "64 Allée de Bercy", "20 avenue de Ségur"),
y = c("75015", "75012", "75007"),
z = rnorm(3)
)
f0 <- function(tbl, adresse, code_insee = NULL, code_postal = NULL) {
---
title: "R Notebook"
output: html_notebook
editor_options:
chunk_output_type: inline
---
```{r setup}
library("dplyr")
library("tibble")
library(dplyr)
library(rsdmx)
library(tibble)
library(tricky)
library(DT)
set_standard_names <- function(x) {
x %>% setNames(str_standardize(.))
}
Le contenu de ce fichier ne correspond pas à ce qui est affiché dans l'interface graphique de datainfogreffes. L'erreur provient du fait que les colonnes millesime et date de clôture ont le même nom pour les années 2012, 2013 et 2014. Ainsi, si je regarde les colonnes qui correspondent aux variables de millésime, les colonnes 18, 24 et 27, j'obtiens toujours les mêmes valeurs :
$ csvcut chiffres-cles-2014.csv -d ";" -c 1,2,18,24,27 | head
Dénomination,Siren,millesime,millesime,millesime
WARNER ELECTRIC EUROPE SAS,070201363,2014,2014,2014
WILLIAM JONQUET SAS,306312174,2014,2014,2014
WIND WARD,307571810,2014,2014,2014
Pourtant, si je regarde dans l'interface DataInfogreffes, j'ai bien trois valeurs différentes de millésime pour la première ligne : [DataInfogreffes](https://datainfogreffe.fr/explore/dataset/chiffres-cles-2014/table/?disjunctive.libelle&disjunctive.cp&disjunctive.commune&disjunctive.region&disjunctive.tranche_ca_2013&disjunctive.tranche_ca_2012&sort=ca_2014&
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel
WHERE
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?logiciel ?logiciel_frlabel ?logiciel_enlabel ?frwiki ?licence ?licence_frlabel ?site_officiel ?developpeur ?developpeur_frlabel ?os ?os_frlabel ?tag_stackexchange ?versions ?code_source ?freebase ?langage_programmation ?suivi_bugs ?frwikibook ?image ?logotype
WHERE
library(ggplot2)
library(magrittr)
library(ggthemes)
library(scales)
library(gridExtra)
set.seed(1234)
N <- 5
df <- data.frame(x = runif(N), y = letters[1:10])
@pachevalier
pachevalier / Makefile
Created November 24, 2015 15:36
makefile for converting EPCI Shapefiles to KML
all: epci-20150303-5m.kml epci-20150303-50m.kml epci-20150303-100m.kml
epci-20150303-5m.kml: epci-20150303-5m.shp
ogr2ogr -f KML $@ $<
epci-20150303-5m.shp: epci-20150303-5m-shp.zip
unzip $<
epci-20150303-5m-shp.zip:
curl -o $@ "http://osm13.openstreetmap.fr/~cquest/openfla/export/epci-20150303-5m-shp.zip"
# https://www.data.gouv.fr/fr/datasets/contours-des-cantons-electoraux-departementaux-2015/
library("rgdal")
library("rgeos")
library("maptools")
library("ggplot2")
library("dplyr")
library("stringr")
library("mapproj")
library("ggthemes")
cantons <- readOGR("data/cantons2015/", layer= "CANTONS_2015_WGS84")
circleFun <- function(center = c(0,0),diameter = 1, npoints = 100){
r = diameter / 2
tt <- seq(0,2*pi,length.out = npoints)
xx <- center[1] + r * cos(tt)
yy <- center[2] + r * sin(tt)
return(data.frame(x = xx, y = yy))
}
library("venneuler")
library("ggplot2")