|
| 1 | +<!DOCTYPE html> |
| 2 | +<meta charset="utf-8"> |
| 3 | +<title>Nobel-prize Visualisation (for book 'Data-visualisation with Python and JavaScript'</title> |
| 4 | +<!-- IMPORT THE VISUALISATIONS CSS STYLING --> |
| 5 | +<link rel="stylesheet" href="static/css/style.css" type="" media="screen" /> |
| 6 | +<body> |
| 7 | + <div id='chart'> |
| 8 | + <!-- A HEADER WITH TITLE AND SOME EXPLANATORY INFO --> |
| 9 | + <div id='title'>Visualising the Nobel Prize</div> |
| 10 | + <div id="info"> |
| 11 | + This is a companion piece to the book <a href='http://'>Data Visualisation with Python and JavaScript</a>, in which its construction is detailed. The data used was scraped Wikipedia using the <a href='https://en.wikipedia.org/wiki/List_of_Nobel_laureates_by_country'>list of winners by country</a> as a starting point. The accompanying Github repo is <a href='http://github.com/Kyrand/dataviz-with-python-and-js'>here</a>. |
| 12 | + </div> |
| 13 | + <!-- 2. THE PLACEHOLDERS FOR OUR VISUAL COMPONENTS --> |
| 14 | + <div id="nbviz"> |
| 15 | + <!-- BEGIN MENU-BAR --> |
| 16 | + <div id="nobel-menu"> |
| 17 | + <div id="cat-select"> |
| 18 | + Category |
| 19 | + <select></select> |
| 20 | + </div> |
| 21 | + <div id="gender-select"> |
| 22 | + Gender |
| 23 | + <select> |
| 24 | + <option value="All">All</option> |
| 25 | + <option value="female">female</option> |
| 26 | + <option value="male">male</option> |
| 27 | + </select> |
| 28 | + </div> |
| 29 | + <div id="country-select"> |
| 30 | + Country |
| 31 | + <select></select> |
| 32 | + </div> |
| 33 | + <div id='metric-radio'> |
| 34 | + Number of Winners: |
| 35 | + <form> |
| 36 | + <label>absolute |
| 37 | + <input type="radio" name="mode" value="0" checked> |
| 38 | + </label> |
| 39 | + <label>per-capita |
| 40 | + <input type="radio" name="mode" value="1"> |
| 41 | + </label> |
| 42 | + </form> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + <!-- END MENU-BAR --> |
| 46 | + <!-- BEGIN NOBEL-VIZ COMPONENTS --> |
| 47 | + <div id='chart-holder' class='_dev'> |
| 48 | + <div id="nobel-time"></div> |
| 49 | + <div id="nobel-map"> |
| 50 | + <div id="map-tooltip"> |
| 51 | + <h2></h2> |
| 52 | + <p></p> |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + <div id="nobel-list"> |
| 56 | + <h2>Selected winners</h2> |
| 57 | + <table> |
| 58 | + <thead> |
| 59 | + <tr><th id='year'>Year</th><th id='category'>Category</th><th id='name'>Name</th></tr> |
| 60 | + </thead> |
| 61 | + <tbody> |
| 62 | + </tbody> |
| 63 | + </table> |
| 64 | + </div> |
| 65 | + <div id="nobel-winner"> |
| 66 | + <div id="picbox"><img /></div> |
| 67 | + <div id='winner-title'></div> |
| 68 | + <div id='infobox'> |
| 69 | + <div class='property'> |
| 70 | + <div class='label'>Category</div> |
| 71 | + <span name='category'></span> |
| 72 | + </div> |
| 73 | + <div class='property'> |
| 74 | + <div class='label'>Year</div> |
| 75 | + <span name='year'></span> |
| 76 | + </div> |
| 77 | + <div class='property'> |
| 78 | + <div class='label'>Country</div> |
| 79 | + <span name='country'></span> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + <div id='biobox'></div> |
| 83 | + <div id='readmore'><a href='#'>Read more at Wikipedia</a></div> |
| 84 | + </div> |
| 85 | + <div id="nobel-bar"></div> |
| 86 | + </div> |
| 87 | + <!-- END NOBEL-VIZ COMPONENTS --> |
| 88 | + </div> |
| 89 | + </div> |
| 90 | + <!-- 3. THE JAVASCRIPT FILES --> |
| 91 | + <!-- THIRD-PARTY JAVASCRIPT LIBRARIES, MAINLY D3 --> |
| 92 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.js"></script> |
| 93 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.20/topojson.min.js"></script> |
| 94 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/queue-async/1.0.7/queue.min.js"></script> |
| 95 | + <script src="static/lib/crossfilter.min.js"></script> |
| 96 | + <!-- THE JAVASCRIPT FOR OUR NOBEL ELEMENTS --> |
| 97 | + |
| 98 | + <script> |
| 99 | + window.$STATIC_API = true; |
| 100 | + $EVE_API = 'static/data/api/'; |
| 101 | + <!-- $EVE_API = {{ config.EVE_API|tojson|safe }}; --> |
| 102 | + </script> |
| 103 | + |
| 104 | + <script src="static/js/nbviz_core.js" ></script> |
| 105 | + <script src="static/js/nbviz_menu.js" ></script> |
| 106 | + <script src="static/js/nbviz_map.js"></script> |
| 107 | + <script src="static/js/nbviz_bar.js"></script> |
| 108 | + <script src="static/js/nbviz_time.js"></script> |
| 109 | + <script src="static/js/nbviz_details.js"></script> |
| 110 | + <script src="static/js/nbviz_main.js"></script> |
| 111 | +</body> |
0 commit comments