Skip to content

Instantly share code, notes, and snippets.

@mgiraldo
mgiraldo / hack4fi.ipynb
Created February 8, 2015 11:02
Made for #hack4fi 2015. See also https://github.com/mgiraldo/infinipic
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mgiraldo
mgiraldo / directorio bogotá 1888.geojson
Last active August 29, 2015 14:12
Prominent politicians living in Bogotá in 1888 (GeoJSON). As seen in http://www.bibliotecanacional.gov.co/recursos_user/bookreader/1889_sala3a_12756/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mgiraldo
mgiraldo / a-web-maps-101.md
Last active August 22, 2018 11:34
A web maps primer

#A web maps primer

I was invited to the National Library of Colombia's 2nd Digital Book Week as a speaker and to give a workshop on digital mapping tools. I thought it would be useful to share that workshop since it encompasses a lot of different processes and tools that make digital cartography today very accessible. It is a primer on working with various free web mapping tools so you can make your own awesome maps.

##TL;DR You will make [this][result]. This tutorial assumes you have a digitized map and some data you want to overlay on it. The general steps covered are:

  1. geo-referencing the scanned map so that web tiles can be generated
  2. generating GeoJSON data to be overlaid
  3. creating a custom base map (to serve as reference/present day)
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 9 columns, instead of 7. in line 5.
Name,Photo,Address,Term,Office,Page,Directory Occupation,Latitude,Longitude
Salvador Camacho Roldán ,http://upload.wikimedia.org/wikipedia/commons/c/cd/SalvadorCamacho.jpg,"361, Calle 10. — 178, Calle 12.",1868-1869 / 1871,President,59,comerciante,4.598056,-74.075833
Miguel Antonio Caro Tobar,http://upload.wikimedia.org/wikipedia/commons/5/5c/Miguel_Antonio_Caro_2.jpg,"127, Carrera 11.",1892-1898,Vicepresident,64,literato,4.598056,-74.075833
Antonio Basilio Cuervo,http://upload.wikimedia.org/wikipedia/commons/b/b3/Antonio_Basilio_Cuervo.jpg,"256, Calle 12. — 201, Carrera 3.",1893,Minister,86,talabartero,4.598056,-74.075833
Carlos Holguín Mallarino,https://upload.wikimedia.org/wikipedia/commons/7/77/Carlos_Holgu%C3%ADn_Mallarino.jpg,"208, Carrera 8.",1888-1892,Acting President,154,Ministro de Estado,4.598056,-74.075833
Rafael Núñez Moledo,https://upload.wikimedia.org/wikipedia/commons/0/09/Rafael_Nunez_cph.3a03388.jpg,"157, A, Carrera 7.",1880-1882 / 1884-1886 / 1887 -1888 / 1892-1894,President,222,Presidente
@mgiraldo
mgiraldo / single label classifier.ipynb
Last active August 29, 2015 14:07
single label book classifier
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am mgiraldo on github.
  • I am mgiraldo (https://keybase.io/mgiraldo) on keybase.
  • I have a public key whose fingerprint is 28DB EC43 3E95 F205 173B 633B ED50 1218 0315 0A3D

To claim this, I am signing this object:

@mgiraldo
mgiraldo / polygonfix writeup.ipynb
Last active August 29, 2015 14:04
Finding shape consensus among multiple geo polygons. See: http://nbviewer.ipython.org/gist/mgiraldo/a68b53175ce5892531bc
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mgiraldo
mgiraldo / postgis-cluster-lat-lon-with-filters.sql
Last active August 29, 2015 14:01
given a PostGIS table `lname` with `lat` and `lon` columns and primay key `gid`, make a cluster filtering by `filtercol` column with `filterval` value and excluding `excludecol` column with `excludeval` value
CREATE OR REPLACE FUNCTION get_domains_n(lname varchar, lat varchar, lon varchar, gid varchar, radius numeric, filtercol varchar, filterval varchar, excludecol varchar, excludeval varchar)
RETURNS SETOF record AS
$$
DECLARE
lid_new integer;
dmn_number integer := 1;
outr record;
innr record;
r record;
BEGIN
@mgiraldo
mgiraldo / 960grid.css.scss
Created May 15, 2012 17:27
SCSS implementation of the 960.gs grid based on the SASS version found in https://github.com/nextmat/compass-960-plugin
$ninesixty-gutter-width: 20px !default;
$ninesixty-grid-width: 960px !default;
$ninesixty-columns: 12 !default;
$ninesixty-class-separator: "_" !default;
@mixin grid-container {
margin-left: auto;