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 February 26, 2019 11:15
CARTO.js + Category Dataviews + Vega Pie Chart
<!DOCTYPE html>
<html>
<head>
<title>CARTO.js + Category Dataviews + Vega Pie Chart</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,600,700|Open+Sans:300,400,600" rel="stylesheet">
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
@ramiroaznar
ramiroaznar / index.html
Created February 18, 2019 16:09
CARTO.js Histogram Dataview and Chart.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CARTO.js Histogram Dataview and Chart.js</title>
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<link href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" rel="stylesheet">
<!-- Include CARTO.js -->
@ramiroaznar
ramiroaznar / index.html
Created November 16, 2018 14:42
Bizi Routing | CARTO VL
<!DOCTYPE html>
<html>
<head>
<title>Bizi Routing | CARTO VL</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://libs.cartocdn.com/carto-vl/v1.0.0/carto-vl.min.js"></script>
<!-- Include Mapbox GL JS -->
@ramiroaznar
ramiroaznar / index.html
Created October 22, 2018 16:04
Animate origins, destinations and connections with CARTO VL
<!DOCTYPE html>
<html>
<head>
<title>Bizi Movement | CARTO VL</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://libs.cartocdn.com/carto-vl/v0.9.1/carto-vl.min.js"></script>
<!-- Include Mapbox GL JS -->
@ramiroaznar
ramiroaznar / index.html
Created August 24, 2018 10:45
Time Series widget with Chart.js and CARTO.js v4 dataviews
<!DOCTYPE html>
<html>
<head>
<title>Time Series widget | CARTO</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<link href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" rel="stylesheet">
<!-- Include CARTO.js -->
@ramiroaznar
ramiroaznar / app.js
Last active July 20, 2018 10:33
CARTO.js v4 Hack Autostyle
const map = L.map('map').setView([30, 0], 3);
// add basemap
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png', {
maxZoom: 18
}).addTo(map);
// add CARTO client
const client = new carto.Client({
apiKey: 'default_public',
@ramiroaznar
ramiroaznar / index.html
Created July 18, 2018 16:41
GR11 Vector Map | CARTO VL
<!DOCTYPE html>
<html>
<head>
<title>GR11 Vector Map | CARTO VL</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://libs.cartocdn.com/carto-vl/v0.5.3/carto-vl.min.js"></script>
<!-- Include Mapbox GL JS -->
<script src="https://libs.cartocdn.com/mapbox-gl/v0.45.0-carto1/mapbox-gl.js"></script>
@ramiroaznar
ramiroaznar / index.html
Created July 18, 2018 11:17
Click on button to open a Leaflet popup | CARTO.s v4.1
<!DOCTYPE html>
<html>
<head>
<title>Click on button to open a Leaflet popup | CARTO.s v4.1</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!-- Include jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
@ramiroaznar
ramiroaznar / index.html
Created July 17, 2018 14:57
CARTO line styles | CARTO.s v4.1
<!DOCTYPE html>
<html>
<head>
<title>CARTO line styles | CARTO.s v4.1</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<link href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" rel="stylesheet">
<!-- Include CARTO.js -->
@ramiroaznar
ramiroaznar / index.html
Created July 17, 2018 11:22
Feature over/out + popup | CARTO.s v4.1
<!DOCTYPE html>
<html>
<head>
<title>Feature over/out + popup | CARTO.s v4.1</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<link href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" rel="stylesheet">
<!-- Include CARTO.js -->