This aims at visualizing Barclays bikes against the tube map
This file contains 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 psutil | |
def get_connections(p): | |
try: | |
return p.get_connections() | |
except: | |
return [] | |
This file contains 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
# Find open FirefoxOS connection open and listening for remote debugging | |
import psutil | |
def get_connections(p): | |
try: | |
return p.get_connections() | |
except: | |
return [] |
This file contains 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
var discoverPorts = function (callback) { | |
var ports = []; | |
if (os == 'darwin') { | |
var output = exec(LSOF_CMD, {silent: true}).output; | |
var regex = /^b2g[-bin]?.*[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:([0-9]*)/; | |
var lines = output.split('\n'); | |
for (var line=0; line < lines.length; line++) { | |
var matches = regex.exec(lines[line]); |
This file contains 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
var gulp = require('gulp'); | |
var deploy = require('moz-deploy-b2g'); | |
var reloadcss = require('moz-reloadcss-b2g'); | |
var zip = require('gulp-zip'); | |
var paths = { | |
build: ['**/*.html', '**/*.properties', '**/*.js', '!**/node_modules/**/*'], | |
css: ['**/*.css'], | |
}; |
This file contains 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
node getAttachments.js | grep filename | sed "s/\ *filename:\ '~\(.*\),/'\/Users\/mozilla\1/" | sed 's/^/open\ /g' |
Visualizing empty and full Barclays' bikes stops
- Red is full (2 empty spaces left)
- Green is empty (2 bikes left)
See the tubemaps library
This is part of a set of visualisation that try to improve the Barclay's bike distribution in London. Visualizing the map of the London Tube is the first step to understand any correlation with bikes usage.
The technical aim I tried to achieve, is a very simple codebase that enables interaction (such as zooming) for later data analysis.
I have been using RandomETC's idea. However, in order to support scaling and to have a more structured code-base, most of the code has been re-written.
Showing how you can visualize tube closures with TubeMaps
Showing Voronoi with TubeMaps
OlderNewer