Built with blockbuilder.org
Last active
March 14, 2018 21:19
-
-
Save smokbel/424a2c74da1ec88dd05875586b23449d to your computer and use it in GitHub Desktop.
fresh block
This file contains hidden or 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
license: mit |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://d3js.org/d3.v3.min.js"></script> | |
<script src="https://d3js.org/topojson.v1.js"></script> | |
<script src="https://d3js.org/d3-array.v1.min.js"></script> | |
<script src="https://d3js.org/d3-geo.v1.min.js"></script> | |
<script src="https://d3js.org/d3-geo-projection.v2.min.js"></script> | |
<link rel="stylesheet" href="style.css"/> | |
</head> | |
<body> | |
<script> | |
var width = 960, height = 700; | |
var svg = d3.select('#map').append('svg') | |
.attr('width', width) | |
.attr('height', height) | |
d3.json('CensusSubDiv.json', function(error, CensusSubDiv) { | |
if (error) return console.error(error); | |
svg.append('path') | |
.datum(topojson.feature(CensusSubDiv, CensusSubDiv.objects.CensusSubDivision)) | |
.attr('d', d3.geo.path().projection(d3.geo.mercator())) | |
.attr('id', 'ont') | |
; | |
</script> | |
</body> | |
This file contains hidden or 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 width = 960, height = 700; | |
var svg = d3.select('#map').append('svg') | |
.attr('width', width) | |
.attr('height', height) | |
d3.json('CensusSubDiv.json', function(error, CensusSubDiv) { | |
if (error) return console.error(error); | |
svg.append('path') | |
.datum(topojson.feature(CensusSubDiv, CensusSubDiv.objects.CensusSubDivision)) | |
.attr('d', d3.geo.path().projection(d3.geo.mercator())) | |
.attr('id', 'ont') | |
; | |
}); |
This file contains hidden or 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
#ont { | |
stroke: black; | |
fill: green; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment