Tracking the path of hurricanes Irma and Jose.
Source: European Center for Medium-Range Weather Forecasts, National Weather Service.
Tiles from MODIS Terra.
This file contains 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
// chrome snippet | |
var layersMarkers = []; | |
var layersPolygons = []; | |
var layers = [] | |
var geojson = { | |
"type": "FeatureCollection", | |
"features": [] | |
} | |
var output = { | |
"type": "FeatureCollection", |
This file contains 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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<style> | |
html { | |
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; |
Most basic example to center and scale your map with d3.geoBounds(), d3.geoCentroid() and d3.geoDistance().
This file contains 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
border: none | |
height: 600 |
This file contains 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
// https://github.com/d3/d3-scale/blob/11777dac7d4b0b3e229d658aee3257ea67bd5ffa/src/band.js#L32 | |
x.invert = function(_) { | |
const scale = this; | |
const domain = scale.domain; | |
const paddingOuter = scale.paddingOuter(); | |
const paddingInner = scale.paddingInner(); | |
const step = scale.step(); | |
const range = scale.range(); | |
var domainIndex, |
How to use a regex to replace commas with points using gedit:
Having a csv
like following:
c,m,p2019,p2016,p2015,p2011
w,x,"75.74","77.50","74.98","78.14"
g,f,"76.80","71.99","71.97","77.75"
i,b,"69.41","64.28","62.95","69.20"
b,h,"80.00","77.41","74.58","80.13"
This file contains 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
border:none | |
height:696 | |
license:MIT |
This file contains 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 <- ggplot(data = pf, aes(x = age, y = df)) + | |
geom_point(alpha = 1/100, | |
position = position_jitter(h = 0), | |
color = "darkred") | |
ggplot(data = layer_data(plot, 1), aes(x = x, y = y)) + | |
geom_point(alpha = 1/20) |
This file contains 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
border: none | |
height: 600 |
NewerOlder