Skip to content

Instantly share code, notes, and snippets.

View andrewbt's full-sized avatar

Andrew Thompson andrewbt

View GitHub Profile
@andrewbt
andrewbt / info.json
Created October 21, 2019 17:24
TileJSON.io - test
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
]
},
@andrewbt
andrewbt / index.html
Created August 2, 2019 17:58
Basic CARTO VL Layer
<!DOCTYPE html>
<html>
<head>
<title>Add layer | CARTO</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<script src="https://libs.cartocdn.com/carto-vl/v1.4.1/carto-vl.min.js"></script>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.css" rel="stylesheet" />
@andrewbt
andrewbt / info.json
Created March 8, 2019 22:13
TileJSON.io - test
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@andrewbt
andrewbt / Redshift_Example_clean.ipynb
Created January 11, 2019 18:59
How to use CARTOframes to connect to an AWS Redshift DB and geocode that data in CARTO
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewbt
andrewbt / .block
Created September 28, 2018 15:09
Big Red Square
license: mit
@andrewbt
andrewbt / .block
Created September 28, 2018 14:58
fresh block
license: mit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewbt
andrewbt / .block
Created February 20, 2018 22:33
Opta Map
license: mit
CREATE OR REPLACE FUNCTION random_time_from_year_string(y TEXT)
RETURNS timestamp AS $$
select (y || '-01-01 00:00:00')::timestamp +
random() * ((y || '-12-31 23:59:59')::timestamp -
(y || '-01-01 00:00:00')::timestamp);
$$ LANGUAGE SQL IMMUTABLE STRICT;
@andrewbt
andrewbt / index.html
Last active August 15, 2017 14:08
torque and raster layer together
<!DOCTYPE html>
<html>
<head>
<title>Named Maps Tutorial | CartoDB</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" />
<style>
html, body, #map {