Skip to content

Instantly share code, notes, and snippets.

View peterdesmet's full-sized avatar

Peter Desmet peterdesmet

View GitHub Profile
@peterdesmet
peterdesmet / ericSuperimposedDailyTorque.css
Last active August 29, 2015 13:56
CartoDB CSS and SQL to visualize flights of gull Eric with days superimposed on each other.
/** torque visualization */
Map {
-torque-frame-count:2048;
-torque-animation-duration:30;
-torque-time-attribute:"date_time";
-torque-aggregation-function:"count(cartodb_id)";
-torque-resolution:1;
-torque-data-aggregation:linear;
}
@peterdesmet
peterdesmet / ericFlightPathsTorque.css
Last active January 4, 2016 02:29
CartoDB CSS and SQL to visualize flight tracks of gull Eric grouped by seasonal behaviour in Torque. Expressing the seasonal behaviour as a number allows Torque to differentiate between those.
/** torque visualization */
Map {
-torque-frame-count:512;
-torque-animation-duration:40;
-torque-time-attribute:"date_time";
-torque-aggregation-function:"avg(behaviour_number)";
-torque-resolution:1;
-torque-data-aggregation:linear;
}
@peterdesmet
peterdesmet / ericFlightPaths.css
Last active January 4, 2016 02:29
CartoDB CSS and SQL to visualize flight tracks of gull Eric grouped by seasonal behaviour.
/** category visualization */
#bird_tracking {
line-width: 1;
line-opacity: 0.9;
}
#bird_tracking[behaviour="1. Egg incubation"] {
line-color: #b81609;
}
@peterdesmet
peterdesmet / cc0-organizations.md
Last active January 3, 2016 08:39
List of organizations in the field of life sciences requiring CC0 for submitted data.
@peterdesmet
peterdesmet / LatLong Crosshairs.js
Last active January 2, 2016 19:28
LatLong Crosshairs for Google Maps by Pierre Bélisle and Peter Desmet for Canadensys. http://www.canadensys.net/latlong-crosshairs
javascript:var coord;var output;var xhs;if(!document.getElementById('xhs')){xhs=document.createElement('div');xhs.setAttribute('id','xhs');xhs.setAttribute('style', 'background:url(\'http://www.canadensys.net/crosshair.png\') top left no-repeat;position:absolute;top:50%;left:50%;margin-top:-7px;margin-left:-7px;height:15px;width:15px;');xhs.onclick=function(){coord = [gApplication.getMap().getCenter().lat(),gApplication.getMap().getCenter().lng()];output = Math.round(coord[0]*10000000)/10000000 + '\t' + Math.round(coord[1]*10000000)/10000000;prompt('Latitude and Longitude',output);};void(document.getElementById('map').appendChild(xhs));}else{void(document.getElementById('map').removeChild(xhs));}