Skip to content

Instantly share code, notes, and snippets.

View stuartlynn's full-sized avatar

Stuart Lynn stuartlynn

  • Two Sigma
  • Brooklyn
View GitHub Profile
@stuartlynn
stuartlynn / index.html
Created September 5, 2018 14:47
Pluto
<!DOCTYPE html>
<html>
<head>
<title>Add layer | CARTO</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="http://libs.cartocdn.com/carto-vl/v0.7.0/carto-vl.js"></script>
<!-- Include Mapbox GL JS -->
<script src="https://libs.cartocdn.com/mapbox-gl/v0.48.0-carto1/mapbox-gl.js"></script>
@stuartlynn
stuartlynn / index.html
Created April 23, 2018 14:28
DIVI bikes
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>DiviBikes</title>
<script src="https://cartodb.github.io/carto-vl/dist/carto-vl.js"></script>
<script src="https://cartodb.github.io/carto-vl/vendor/mapbox-gl-dev.js"></script>
<link href="https://cartodb.github.io/carto-vl/vendor/mapbox-gl-dev.css" rel="stylesheet" />
<style type="text/css" media="screen">
create table result as (
with one as (
SELECT nyc_pluto_15v1_resonly.the_geom,
white_noth,
asian_noth,
black_noth,
hl,
lt_12_race.cartodb_id,
resarea,
https://drive.google.com/a/cartodb.com/file/d/17A_2lnY6C1x18Wl26R_Tb4lh1lKmaswM/view?usp=sharing
@stuartlynn
stuartlynn / index.html
Created November 7, 2017 14:59
Katrina
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<!-- Bootstrap -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
@stuartlynn
stuartlynn / Readme.md
Created September 11, 2015 18:50
Torque Vector renderer test

Torque vector field renderer test

This experiment introcudes a new renderer. By specifying marker-type: vector; in the CartoCSS we can render a vector field. The magnitude of each tick is specified by marker-mag and the direction is specified by marker-angle (radians) while the color of each marker is specified by marker-stroke. Using torque multi variable we can make each of these dependant on different variables.

Example of the CartoCSS for the example is here:

@stuartlynn
stuartlynn / GettingStarted.ipynb
Created September 7, 2017 20:11
CartoFramesGettingStarted
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stuartlynn
stuartlynn / zappa_settings.json
Last active August 3, 2017 20:45
zappa settings
{
"dev": {
"app_function": "plotter.app",
"s3_bucket": "zappa-888fe0qlm",
"slim_handler": true
}
}
@stuartlynn
stuartlynn / matplotlibrc
Created August 3, 2017 00:39
Matplotlibrc
backend : Agg
@stuartlynn
stuartlynn / setup_venv.sh
Created August 3, 2017 00:35
virtualenv setup
virtualenv env
source env/bin/activate
pip install zappa requests pandas matplotlib flask