Skip to content

Instantly share code, notes, and snippets.

@martgnz
martgnz / .block
Last active October 3, 2023 04:20
Canvas Globe
license: mit
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
Last active March 23, 2021 02:47
Choropleth map
license: mit
@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:47
Let's Make a Map... With Canvas and Spam!
license: mit
border: none
height: 1000
@martgnz
martgnz / .block
Last active September 13, 2019 09:32
Spam.js Choropleth IV
license: mit
height: 650
border: none
@martgnz
martgnz / .block
Last active September 13, 2019 09:29
Choropleth III
license: mit
border: none
height: 690
@martgnz
martgnz / .block
Last active September 13, 2019 09:27
Mapping hexagons
license: gpl-3.0
height: 510
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 / 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() {