Skip to content

Instantly share code, notes, and snippets.

View jsanz's full-sized avatar
🗺️
Mapping

Jorge Sanz jsanz

🗺️
Mapping
View GitHub Profile
@jsanz
jsanz / README.md
Last active September 14, 2016 09:02
Enterprise API: managing organization users from the command line. bash

The manage-users.sh script helps on performing basic tasks to manage users using CartoDB Enterprise API. Actions available are:

  • List users of an organization
  • Create new users
  • Delete users
  • Update existing users (password and data quota)
  • Retrieve users info (in JSON format)

You need to adapt the script for your environment, the variables are at the beginning of the script as follow:

@jsanz
jsanz / cartodb.css
Last active September 14, 2016 09:01
Talk: Overviews Overview
@import url(https://fonts.googleapis.com/css?family=Montserrat:700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
/**
* Black theme for reveal.js.
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
/*********************************************
* GLOBAL STYLES
*********************************************/
@jsanz
jsanz / README.md
Last active September 14, 2016 08:59
SQL: Routing with CartoDB

Using new CartoDB routing functions, take a scheduled route table made of straight lines with a rough plan for a route and convert it in a detailed route using the shortest path on a car.

Check the viz

@jsanz
jsanz / README.md
Last active September 14, 2016 09:00
JavaScript: Bing on CartoDB

Testing Bing basemaps with Leaflet/CartoDB

@jsanz
jsanz / README.md
Last active September 14, 2016 09:00
JavaScript: CartoDB in Bing SDK

Using CartoDB tiles and features inside a simple Bing Maps application

@jsanz
jsanz / template.js
Last active September 14, 2016 09:00
API: Named Maps minimal template
{
"auth": {
"method": "open"
},
"version": "0.0.1",
"name": "test_literal",
"placeholders": {
"color": {
"type": "css_color",
"default": "red"
@jsanz
jsanz / app.js
Last active November 6, 2017 10:08 — forked from rochoa/app.js
Basic CARTO viewer
'use strict';
var DEFAULTS = {
endpoint: 'http://jsanz.cartodb.com/api/v1/map',
sql: 'select * from ne_10m_populated_places_simple',
cartocss: [
"#layer['mapnik::geometry_type'=1] {",
" marker-width: 7;",
" marker-fill: #EE4D5A;",
" marker-fill-opacity: 0.9;",
@jsanz
jsanz / README.md
Last active May 17, 2018 13:53
Geocode with Mapzen search and Google Spreadsheets

How to set up a quick geocoding system on google spreadsheets.

  1. Create a new spreadsheet
  2. Open the Scripts editor and paste the script attached
  3. Use on your spreadsheet this new formula
=searchMapzen(place_cell,mapzen_api_key)

@jsanz
jsanz / ovafix.md
Last active January 10, 2019 14:03
Making a OVA file compatible with VMWare

This is a recipe to fix this error when importing to VMWare an OVA file:

Download and install OVFTool (https://www.vmware.com/support/developer/ovf/)

Convert OVA to VMX using the command below (this will create example.vmx)

$ ovftool example.ova example.vmx
@jsanz
jsanz / query.sql
Created September 5, 2016 09:12
SQL: Stacking Chips
WITH
data as (
SELECT
cartodb_id,
ST_SnapToGrid(the_geom,.5) as the_geom
FROM team
),
m AS (
SELECT array_agg(cartodb_id) id_list, the_geom, ST_Y(the_geom) y
FROM data