An interactive multi-line chart.
Note, I borrowed a bit of code from Duopixel's excellent code sample here.
Built with blockbuilder.org
An interactive multi-line chart.
Note, I borrowed a bit of code from Duopixel's excellent code sample here.
Built with blockbuilder.org
I recently made my first map with MapBox's new WebGL+JavaScript API. There aren't many examples of how to do this yet, even on MapBox's API page, so I'll document my own experience here.
My map is made of several textures taken from Van Gogh paintings. The long-term goal is to allow a user to select which artworks they want to take textures from, but for now there is just one setting.
#http://docs.python.org/2.7/library/csv.html | |
import csv, codecs, cStringIO | |
class UTF8Recoder: | |
""" | |
Iterator that reads an encoded stream and reencodes the input to UTF-8 | |
""" | |
def __init__(self, f, encoding): | |
self.reader = codecs.getreader(encoding)(f) |
EPSG: 4326 uses a coordinate system on the surface of a sphere or ellipsoid of reference. | |
WGS 84 - Earth as Geoid. -Mercator | |
EPSG: 3857 uses a coordinate system PROJECTED from the surface of the | |
sphere. Earth as perfectly sphere. -Web Mercator | |
Think of it as this way: | |
EPSG 4326 uses a coordinate system the same as a GLOBE (curved surface). | |
EPSG 3857 uses a coordinate system the same as a MAP (flat surface). |
/** | |
* Return a timestamp with the format "m/d/yy h:MM:ss TT" | |
* @type {Date} | |
*/ | |
function timeStamp() { | |
// Create a date object with the current time | |
var now = new Date(); | |
// Create an array with the current month, day and time |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |