Skip to content

Instantly share code, notes, and snippets.

View danicarrion's full-sized avatar

Dani Carrión danicarrion

  • Valladolid, Spain
View GitHub Profile
@danicarrion
danicarrion / index.html
Created May 20, 2015 18:33
createLayer with torque category layer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>Torque category selector</title>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.14/themes/css/cartodb.css" />
<style type="cartocss/text" id="cartocss">
Map {
@danicarrion
danicarrion / README.md
Last active January 12, 2016 15:08
Script that reads from a CartoDB table, geocode each row with Google's geocoder and put them back into CartoDB

This script reads a table fom CartoDB using the SQL API, geocodes one of its fields using Google's geocoder and updates the data on CartoDB.

If no valid credentials are provided for Google's geocoder, the free limits will apply.

TODO: multithread support

@danicarrion
danicarrion / README.md
Last active August 29, 2015 14:21
Reverse geocoding after adding a point to a table on CartoDB

Requirements

  • A table on PostgreSQL/PostGIS (tested with CartoDB) with the following text fields: address, city, country, zipcode.
  • Python functions are enabled.
  • pygeocoder is available to the python function

Usage

Once the function has been created, the trigger must be created like this (assuming the geometry column is called the_geom: