Skip to content

Instantly share code, notes, and snippets.

@5un
Last active April 11, 2018 18:21
Show Gist options
  • Save 5un/dce5cc424a80b749f8ecb1ee5d7b7430 to your computer and use it in GitHub Desktop.
Save 5un/dce5cc424a80b749f8ecb1ee5d7b7430 to your computer and use it in GitHub Desktop.
ischool-geo-viz-template
license: mit

Template

Here you will find an empty HTML template for the workshop. We'll be adding javascript code to the section between the opening and closing <script></script> tags in the index.html file.

Let's get started!

Built with blockbuilder.org

forked from clhenrick's block: ischool-geo-viz-template

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>iSchool GeoVisualization Workshop</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src="//d3js.org/d3.v3.min.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.35.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.35.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
// javascript code goes here
var dataURL = "https://raw.githubusercontent.com/clhenrick/geovisualization_workshop_ischool/master/data/nyc_crashes.geojson";
var accessToken = 'pk.eyJ1IjoiZW-12qYWxvdCIsImEiOiIzOTJmMjBiZmI2NGQ2ZjAzODhiMzhiOGI2MTI1YTk4YSJ9.sIOXXU3TPp5dLg_L3cUxhQ';
mapboxgl.accessToken = accessToken;
var map = new mapboxgl.Map({
container: "map",
style: "mapbox://styles/mapbox/dark-v9",
center: [-74, 40.7],
zoom: 10
});
map.addControl(new mapboxgl.NavigationControl());
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment