Skip to content

Instantly share code, notes, and snippets.

@dyorama
dyorama / 60 % of the damages due to floods in the top 20 cities located in the Alpes-Maritimes
Created April 14, 2016 22:16
Natural disasters: where are the most vulnerable cities in France?
//60 % des arrêtés pour inondations dans les 15 communes
var w = 650;
var h = 350;
var padding = [ 35, 30, 30, 160 ]; //Top, right, bottom, left
var widthScale = d3.scale.linear()
.range([ 0, w - padding[1] - padding[3] ]);
@dyorama
dyorama / natutaldisasters.csv
Created April 14, 2016 21:46
Dataset used for the article "Natural disasters: where are the most vulnerable cities in France ?"
We can't make this file beautiful and searchable because it's too large.
INSEE;Departement;Commune;P�rils;Date d�but;Date fin
73181;73;Mo�tiers;Mouvements de terrain;07/04/15;08/04/2015
2B029;2B;Barbaggio;Inondations et coul�es de boue;15/03/15;17/03/2015
2B030;2B;Barrettali;Inondations et coul�es de boue;15/03/15;17/03/2015
2B054;2B;Campile;Inondations et coul�es de boue;15/03/15;17/03/2015
2B079;2B;Castello-di-Rostino;Inondations et coul�es de boue;15/03/15;17/03/2015
2B152;2B;Luri;Inondations et coul�es de boue;15/03/15;17/03/2015
2B188;2B;Olmeta-di-Tuda;Inondations et coul�es de boue;15/03/15;17/03/2015
2B233;2B;Pino;Inondations et coul�es de boue;15/03/15;17/03/2015
2B299;2B;San-Gavino-d'Ampugnani;Inondations et coul�es de boue;15/03/15;17/03/2015
@dyorama
dyorama / index.html
Last active December 22, 2015 18:58
Catastrophes naturelles dans les Alpes-Maritimes : l’urbanisation pointée du doigt
<!DOCTYPE html>
<html lang="en">
<body>
<meta charset="utf-8">
<style type="text/css">
<iframe frameborder="0" class="juxtapose" width="100%" height="604" src="https://cdn.knightlab.com/libs/juxtapose/latest/embed/index.html?uid=cdb6b186-a8db-11e5-a524-0e7075bba956"></iframe>
@dyorama
dyorama / 20villes.csv
Last active December 6, 2015 22:47
Natural disaters in Alpes-Maritimes
nom 2015 departement
Nice 63 Nice (06)
Cagnes-sur-Mer 48 Cagnes-sur-Mer (06)
Antibes 46 Antibes (06)
Cannes 40 Cannes (06)
Èze 38 Èze (06)
Villeneuve-Loubet 38 Villeneuve-Loubet (06)
Contes 36 Contes (06)
Falicon 36 Falicon (06)
Saint-Laurent-du-Var 32 Saint-Laurent-du-Var (06)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stacked area chart</title>
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
margin: 0;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dyorama
dyorama / index.html
Last active November 15, 2015 18:10
Version 6 : Top 20 french cities by natural disasters : type and number per year
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stacked area chart</title>
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
margin: 0;
@dyorama
dyorama / index.html
Last active November 11, 2015 01:52
Version 5 : Top 20 french cities by natural disasters : type and number per year
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stacked area chart</title>
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
margin: 0;
@dyorama
dyorama / index.html
Created November 9, 2015 20:43
Version 4 : Top 20 french cities by natural disasters : type and number per year
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stacked area chart</title>
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
margin: 0;