This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="subwaymap.jpg" class="zoom" data-magnify-src="subwaymap-large.jpg" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function() { | |
$('.zoom').magnify(); | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fill-extrusion-color: style: { | |
'property': 'precio', | |
'stops': [ | |
[0, '#e6e6e6'], | |
[700, '#ffffb2'], | |
[1754, '#fecc5c'], | |
[2233, '#fd8d3c'], | |
[2751, '#f03b20'], | |
[3683, '#bd0026'] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'fill-extrusion-height': { | |
'property': 'altura', | |
… | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map.on('style.load', function () { | |
map.addSource('buildings', | |
{"type": "vector", | |
"url": "THE TILESET URL" | |
}); | |
map.addLayer({ | |
'id': 'buildings', | |
'interactive': true, | |
'type': 'fill-extrusion', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |