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
library(ggplot2) | |
library(tidyverse) | |
library(fiftystater) | |
mapdata <- read.csv("state-medal-count.csv", header=TRUE, stringsAsFactors=FALSE) | |
mapdata %>% glimpse() | |
data("fifty_states") | |
ggplot() + geom_polygon( data=fifty_states, aes(x=long, y=lat, group = group),color="white", fill="grey10" ) |
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
import csv | |
import requests | |
import threading | |
import os | |
import sys | |
from Queue import Queue | |
from bs4 import BeautifulSoup as bs | |
# Globals | |
q = Queue() |
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, |