Skip to content

Instantly share code, notes, and snippets.

@martgnz
martgnz / tippecanoe-us-buildings-footprints.sh
Last active November 4, 2020 19:28
Process Microsoft's US Building Footprints dataset with Tippecanoe
# command reference https://github.com/mapbox/tippecanoe
# data https://github.com/microsoft/USBuildingFootprints
tippecanoe -z8 \
--coalesce \
--no-tiny-polygon-reduction \
--drop-densest-as-needed \
-o us_buildings.mbtiles us_buildings_preprojected.geojson
@martgnz
martgnz / .block
Last active September 13, 2019 09:27
Mapping hexagons
license: gpl-3.0
height: 510
scrolling: no
border: no
@martgnz
martgnz / d3-container.js
Created July 18, 2018 12:42
D3 and React with D3Container
import React, { Component } from 'react';
export default class D3Container extends Component {
constructor(...args) {
super(...args);
this.d3Render = this.d3Render.bind(this);
}
componentDidMount() {
@martgnz
martgnz / .block
Last active July 8, 2018 12:12
Format last tick across axis transitions
license: gpl-3.0
height: 106
scrolling: no
border: no
@martgnz
martgnz / .block
Last active August 31, 2018 23:24
Scatterplot with convex hulls
license: gpl-3.0
border: none
@martgnz
martgnz / pdf2ai.jsx
Created January 17, 2018 15:08
Batch convert PDF to AI
(function(thisObj) {
main();
function main() {
var pdffiles = File.openDialog(
'Select one or more PDF files',
'*.pdf',
true,
);
if (pdffiles === null) {
return;
@martgnz
martgnz / .block
Created January 3, 2018 13:17
Demers Cartogram II
border: no
height: 560
license: gpl-3.0
@martgnz
martgnz / .block
Last active January 3, 2018 00:43
Demers Cartogram
border: no
height: 500
license: gpl-3.0
@martgnz
martgnz / flac-to-mp3.sh
Created December 20, 2017 20:27
Convert a folder of flac files to mp3 with ffmpeg
find . -name "*.flac" -exec ffmpeg -i {} -acodec libmp3lame -ab 320k {}.mp3 \;