Skip to content

Instantly share code, notes, and snippets.

View mgottholsen's full-sized avatar
🎯
Focusing

Matthew Gotth-Olsen mgottholsen

🎯
Focusing
View GitHub Profile
@mgottholsen
mgottholsen / README.md
Created August 11, 2017 12:26 — forked from jsanz/README.md
Analysis example: Voronoi on CartoDB

This example loads a CartoDB layer using a crazy SQL from a small variation of this awesome Stack Overflow response. Note the use of CSS style tags for the CartoCSS to allow easy editing.

The uncompressed (and not perfect!) version of the SQL to draw the Voronoi diagram is:

WITH 
    Sample AS (
      SELECT st_setsrid(st_union(the_geom),0) as geom 
      FROM registro_centros_nz WHERE spanish = 1
    ),
@mgottholsen
mgottholsen / make_table.py
Created July 14, 2017 18:23 — forked from btbytes/make_table.py
Given a CSV file with a header row, and at-least one row of data, output a SQL `CREATE TABLE` statement by guessing the data type of the columns.
#!/usr/bin/env python
# encoding: utf-8
"""
make_table.py
Given a CSV file with a header row, and at-least one row of data,
output a SQL `CREATE TABLE` statement by guessing the data type of the columns.
Pradeep Gowda <pradeep@btbytes.com>
License: Public Domain
{
"version": "2",
"header": {
"title": "VizWit",
"description": "Lorem ipsum dolor sit amet"
},
"cards": [
{
"x": 0,
"y": 0,
@mgottholsen
mgottholsen / README.md
Last active May 23, 2016 17:10
metrocouncil district

README is empty

@mgottholsen
mgottholsen / README.md
Last active May 23, 2016 16:40
metrocouncil district

README is empty