Skip to content

Instantly share code, notes, and snippets.

View frodrigo's full-sized avatar

Frédéric Rodrigo frodrigo

  • Bordeaux, France
View GitHub Profile
@frodrigo
frodrigo / healthcare_FR_finess.sh
Created August 8, 2018 12:12
Reformatage de l'Extraction Finess des Etablissements Geolocalisés en un seule section
# Install csvkit before, on Ubuntu python2-csvkit or python3-csvkit
cat etalab_cs1100507_stock_20180608-0437.csv | grep 'structureet;' | iconv -f ISO-8859-15 -t utf-8 | csvcut -d ';' -C 1 > finess-structureet.csv
cat etalab_cs1100507_stock_20180608-0437.csv | grep 'geolocalisation;' | iconv -f ISO-8859-15 -t utf-8 | csvcut -d ';' -C 1 > finess-geolocalisation.csv
echo "nofinesset,nofinessej,rs,rslongue,complrs,compldistrib,numvoie,typvoie,voie,compvoie,lieuditbp,commune,departement,libdepartement,ligneacheminement,telephone,telecopie,categetab,libcategetab,categagretab,libcategagretab,siret,codeape,codemft,libmft,codesph,libsph,dateouv,dateautor,datemaj,numuai,coordxet,coordyet,sourcecoordet,datemajcoord" > finess.csv
csvjoin --no-header-row --columns 1,1 --left finess-structureet.csv finess-geolocalisation.csv | tail -n +2 >> finess.csv
@frodrigo
frodrigo / run.java
Created September 19, 2015 16:44
sprit mapotempo optimizer
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jsprit.analysis.toolbox.AlgorithmSearchProgressChartListener;
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
import jsprit.core.algorithm.box.Jsprit;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="http://techblog.mappy.com/Leaflet-active-area/src/L.activearea.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
<style>
body { margin:0; padding:0; }