Example of a CartoDB iframe in the Amp library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import urllib | |
import urllib2 | |
import json | |
import requests | |
# Start a new batch SQL task | |
def cartoBatchQuery(username, api_key, sql): | |
r = requests.post('http://%s.cartodb.com/api/v2/sql/job?api_key=%s' %(username,api_key), | |
headers={'content-type':'application/json'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import urllib | |
import urllib2 | |
import json | |
import requests | |
basemap = { | |
"type": "http", | |
"options": { | |
"urlTemplate": "http://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TYPE minimum_spanning_tree_internal AS ( | |
d NUMERIC[], | |
a INT[], | |
b INT[], | |
geoms GEOMETRY[], | |
ids TEXT[] | |
); | |
CREATE TYPE minimum_spanning_tree_unit AS ( | |
d NUMERIC, |
A basic class that allows you to quickly generate static images from the CartoDB API using custom CartoCSS builders etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Election Mapping Bonanza</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" /> | |
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700|Open+Sans+Condensed:300,700' rel='stylesheet' type='text/css'> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Test of porting SunCalc to SQL | |
-- Original SunCalc https://github.com/mourner/suncalc | |
-- Original SunCalc License https://github.com/mourner/suncalc/blob/master/LICENSE | |
CREATE TYPE suncalc_position AS ( | |
azimuth decimal, | |
altitude decimal | |
); | |
CREATE TYPE suncalc_coords AS ( | |
declination decimal, | |
rightAscension decimal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import string | |
import sys | |
import urllib | |
import urllib2 | |
#Uses Yahoo Placemaker and the python-placemaker library | |
from placemaker import placemaker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>createLayer</title> | |
<link href='http://fonts.googleapis.com/css?family=Alike' rel='stylesheet' type='text/css'> | |
<style> | |
html, body, #map { | |
height: 100%; | |
padding: 0; | |
margin: 0; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.