Skip to content

Instantly share code, notes, and snippets.

View ramiroaznar's full-sized avatar

Ramiro Aznar ramiroaznar

View GitHub Profile
@ramiroaznar
ramiroaznar / index.html
Created June 13, 2017 14:57
featureClick + launch website | CARTO.js
<!DOCTYPE html>
<html>
<head>
<title>featureClick + launch website | CARTO.js</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 {
height: 100%;
@ramiroaznar
ramiroaznar / index.html
Created June 13, 2017 13:43
Set SQL + cluster layer | CARTO.js
<!DOCTYPE html>
<html>
<head>
<title>Set SQL + cluster layer | CARTO.js</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 {
@ramiroaznar
ramiroaznar / index.html
Last active July 28, 2017 13:15
CARTO.js | Show data from overlapping points
<!DOCTYPE html>
<html>
<head>
<title>CARTO.js | Show data from overlapping points</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="https://cartodb.com/assets/favicon.ico" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Created June 8, 2017 11:25
CARTO.js | Set bbox from selected feature
<!DOCTYPE html>
<html>
<head>
<title>CARTO.js | Set bbox from selected feature</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 {
height: 100%;
@ramiroaznar
ramiroaznar / index.html
Created June 8, 2017 10:52
CARTO.js | Zoom on selected feature
<!DOCTYPE html>
<html>
<head>
<title>CARTO.js | Zoom on selected feature</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="https://cartodb.com/assets/favicon.ico" />
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / readme.md
Last active June 1, 2017 11:25
A series of unfortunate maps. Additional Info.
@ramiroaznar
ramiroaznar / query.sql
Last active May 11, 2017 13:50
Check common columns in two tables in PostgreSQL
with a as (
SELECT column_name
FROM information_schema.columns
WHERE table_name = 'world_borders'
),
b as (
SELECT column_name
FROM information_schema.columns
WHERE table_name = 'populated_places'
@ramiroaznar
ramiroaznar / index.html
Last active May 12, 2017 14:12
CARTO Locations Training Sample
<!DOCTYPE html>
<html>
<head>
<title>CARTO Locations | Training Sample</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="https://cartodb.com/assets/favicon.ico" />
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Last active May 12, 2017 14:10
Get coordinates from feature with CARTO.js
<!DOCTYPE html>
<html>
<head>
<title>Get coordinates from feature with CARTO.js</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="https://cartodb.com/assets/favicon.ico" />
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / README.md
Last active July 5, 2018 20:14
Leaflet's flyTo method

Click on a location and the flyTo method will zoom and pan to that particular place.