Skip to content

Instantly share code, notes, and snippets.

<img src="subwaymap.jpg" class="zoom" data-magnify-src="subwaymap-large.jpg" />
<link rel="stylesheet" href="css/magnify.css">
<script src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="js/jquery.magnify.js"></script>
<script>
$(document).ready(function() {
$('.zoom').magnify();
});
</script>
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<title>Magnified map</title>
<link rel="stylesheet" href="css/magnify.css">
<script src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="js/jquery.magnify.js"></script>
</head>
fill-extrusion-color: style: {
'property': 'precio',
'stops': [
[0, '#e6e6e6'],
[700, '#ffffb2'],
[1754, '#fecc5c'],
[2233, '#fd8d3c'],
[2751, '#f03b20'],
[3683, '#bd0026']
]
'fill-extrusion-height': {
'property': 'altura',
}
map.on('style.load', function () {
map.addSource('buildings',
{"type": "vector",
"url": "THE TILESET URL"
});
map.addLayer({
'id': 'buildings',
'interactive': true,
'type': 'fill-extrusion',
var center = [-58.388875,-34.612427];
mapboxgl.accessToken = 'YOUR ACCESS TOKEN';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/YOUTUSER/YOUR_BASE_STYLE',
center: center,
zoom: 13.5,
pitch: 59.5,
<html>
<body
<!-- mapbox gl js -->
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.css' rel='stylesheet' />
<script>
// Here we are going to put our map code
</script>
</body>
# How to make small multiples in R using geom_line()
library(ggplot2)
# Load the csv from previous tutorial
murders_separate <- read.csv(file="murders_separate.csv")
# View the dataset in RStudio (note the capital V)