Last active
December 20, 2015 11:39
-
-
Save mapsam/6125475 to your computer and use it in GitHub Desktop.
Eight-thousands
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> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<style> | |
#names { | |
list-style-type:disc; | |
display:inline-block; | |
width:200px; | |
} | |
#names li { | |
margin:3px 0; | |
font-family:arial; | |
font-size:0.8em; | |
color:#555; | |
} | |
#names li:hover { | |
font-weight:bold; | |
cursor:pointer; | |
} | |
.arc path { | |
stroke: #fff; | |
} | |
</style> | |
<body> | |
<ul id="names"></ul> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
var width = 500, | |
height = 250, | |
radius = Math.min(width, height) / 4; | |
var arc = d3.svg.arc() | |
.outerRadius(radius - 10) | |
.innerRadius(radius - 70) | |
var pie = d3.layout.pie() | |
.sort(null) | |
.value(function(d) { return d.deaths }); | |
var svg = d3.select('body').append('svg') | |
.attr('width', width) | |
.attr('height', height) | |
.append('g') | |
.attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')'); | |
d3.csv("mountains.csv", function(error, rows) { | |
var length = rows.length; | |
for (mug=0; mug<length; mug++){ | |
var name = rows[mug].peak; | |
var listItem = document.createElement('li'); | |
listItem.setAttribute('class', 'name'); | |
listItem.innerHTML=name; | |
document.getElementById('names').appendChild(listItem); | |
}; | |
rows.forEach(function(d) { | |
d.deaths = +d.deaths; | |
}); | |
var chart = svg.selectAll('.arc') | |
.data(pie(rows)) | |
.enter().append('g') | |
.attr('class', 'arc'); | |
chart.append('path') | |
.attr('d', arc) | |
.style('fill', '#c0c0c0'); | |
}); | |
</script> | |
</body> | |
</html> |
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
peak | lat | lon | height | asc_tot | deaths | death_rate | fir_asc | fa_name | |
---|---|---|---|---|---|---|---|---|---|
Annapurna I | 28.596111 | 83.820278 | 8091 | 153 | 59 | 38.56 | 6/3/1950 | Maurice Herzog (FR); Louis Lachenal (FR) | |
Broad Peak | 35.810833 | 76.568333 | 8051 | 359 | 19 | 5.29 | 6/9/1957 | Fritz Wintersteller (AT); Marcus Schmuck (AT); Kurt Diemberger (AT); Hermann Buhl (AT) | |
Cho Oyu | 28.094167 | 86.660833 | 8201 | 2668 | 39 | 1.46 | 10/19/1954 | Joseph Joechler (AT); Pasang Dawa Lama (NP); Herbert Tichy (AT) | |
Dhaulagiri I | 28.698333 | 83.4875 | 8167 | 358 | 58 | 16.20 | 5/13/1960 | Kurt Diemberger (AT); Peter Diener (DE); Nawang Dorje (NP); Nima Dorje (NP); Ernst Forrer (CH); Albin Schelbert (AT) | |
Everest | 27.988056 | 86.925278 | 8848 | 3684 | 210 | 5.70 | 5/29/1953 | Edmund Hillary (NZ); Tenzing Norgay (NP) | |
Gasherbrum I | 35.724444 | 76.696389 | 8080 | 265 | 25 | 9.43 | 7/5/1958 | Andrew Kauffman (US); Pete Schoening (US) | |
Gasherbrum II | 35.758333 | 76.653333 | 8034 | 836 | 19 | 2.27 | 7/7/1956 | Fritz Moravec (AT); Josef Larch (AT); Hans Willenpart (AT) | |
K2 | 35.8825 | 76.513333 | 8611 | 284 | 81 | 28.52 | 7/31/1954 | Achille Compagnoni (IT); Lino Lacedelli (IT) | |
Kangchenjunga | 27.7025 | 88.148333 | 8586 | 209 | 40 | 19.14 | 5/25/1955 | George Band (UK); Joe Brown (UK) | |
Lhotse | 27.961667 | 86.933333 | 8516 | 221 | 11 | 4.98 | 5/18/1956 | Fritz Luchsinger (CH); Ernst Reiss (CH) | |
Makalu | 27.889167 | 87.088611 | 8485 | 234 | 26 | 11.11 | 5/15/1955 | Jean Couzy (FR); Lionel Terray (FR) | |
Manaslu | 28.55 | 84.559722 | 8163 | 297 | 53 | 17.85 | 5/9/1956 | Toshio Imanishi (JA); Gyalzen Norbu (NP) | |
Nanga Parbat | 35.2375 | 74.589167 | 8126 | 287 | 64 | 22.30 | 7/3/1953 | Hermann Buhl (AT) | |
Shishapangma | 28.352222 | 85.779722 | 8027 | 274 | 23 | 8.39 | 5/2/1964 | Hsu Ching (CN); Chang Chun-yen (CN); Wang Fuzhou (CN);Chen San (CN); Cheng Tien-liang (CN); Wu Tsung-yue (CN); Sodnam Doji (CN); Migmar Trashi (CN); Doji (CN); Yonten (CN) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment