I hereby claim:
- I am moklick on github.
- I am moklick (https://keybase.io/moklick) on keybase.
- I have a public key ASCRAEeOQsPTamLtJzCu8u1sdYvSq43rr2iOmsyPIAU5Qgo
To claim this, I am signing this object:
import { formatDefaultLocale } from 'd3-format'; | |
const germanNumberFormat = formatDefaultLocale({ | |
decimal: ',', | |
thousands: '.', | |
grouping: [3], | |
currency: ['€', ''] | |
}); | |
export function numberFormat(num, decimals = 0) { |
// via http://stackoverflow.com/questions/10730309/find-all-text-nodes-in-html-page#answer-10730777 | |
function findTextNodes(el) { | |
var node; | |
var textNodes = []; | |
var walk = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, null, false); | |
while (node = walk.nextNode()) { | |
textNodes.push(node); | |
} | |
return textNodes; | |
} |
I hereby claim:
To claim this, I am signing this object:
const customCRS = L.extend({}, L.CRS.Earth, { | |
projection: L.Projection.SphericalMercator, | |
transformation: (function () { | |
var scale = 0.5 / (Math.PI * L.Projection.SphericalMercator.R); | |
return new L.Transformation(scale, 0.5, -scale, 0.5); | |
}()), | |
scale: function (zoom) { | |
return 512 * Math.pow(2, zoom); | |
} | |
}); |
/* | |
* Get the good old favorite ★ back. | |
* | |
* Copy the few lines below into the console of your browser and press enter. | |
* Chrome: https://developer.chrome.com/devtools#access | |
* Firefox: https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console | |
*/ | |
// updated version (this also works for new pulled tweets): | |
var style = document.createElement('style'); |
// boilerplate for processing large geojson/json files.. | |
// npm install --save through2 JSONStream | |
var through = require('through2'); | |
var JSONStream = require('JSONStream'); | |
var fs = require('fs'); | |
var inputStream = fs.createReadStream('./test.geojson'); | |
var outputStream = fs.createWriteStream('./cleaned-geojson.json'); |
osmfilter uk-latest.osm --keep="addr:country= and addr:city= and addr:street=" --ignore-dependencies --drop-relations --drop-ways | osmconverter - --csv="@oname @id @lon @lat addr:country addr:city addr:street" >> streets.csv |