├── LICENSE ├── README.md ├── ch1 ├── bar-charts │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── flotr2.min.js ├── bubble-charts │ ├── img │ │ └── gulf.png │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── flotr2.min.js ├── custom-charts │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── flotr2.min.js ├── line-charts │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── flotr2.min.js ├── pie-charts │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── flotr2.min.js ├── radar-charts │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── flotr2.min.js └── scatter-charts │ ├── index.html │ └── js │ ├── excanvas.min.js │ └── flotr2.min.js ├── ch2 ├── data-via-ajax │ ├── index.html │ └── js │ │ └── excanvas.min.js ├── selecting-content │ ├── index.html │ └── js │ │ └── excanvas.min.js ├── tracking-values │ ├── index.html │ └── js │ │ └── excanvas.min.js └── zooming │ ├── index.html │ └── js │ ├── excanvas.min.js │ └── jquery.flot.selection.js ├── ch3 ├── annotations │ ├── index.html │ └── js │ │ └── excanvas.min.js ├── classic-sparkline │ ├── index.html │ └── js │ │ └── excanvas.min.js ├── click-events │ ├── index.html │ └── js │ │ └── excanvas.min.js ├── composite-charts │ ├── index.html │ └── js │ │ └── excanvas.min.js └── small-multiples │ ├── index.html │ └── js │ └── excanvas.min.js ├── ch4 ├── gantt-charts │ ├── css │ │ └── jquery.gantt.css │ ├── img │ │ ├── grid.png │ │ ├── icon_sprite.png │ │ ├── loader_bg.png │ │ └── slider_handle.png │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── jquery.fn.gantt.min.js ├── graphs │ ├── index.html │ └── js │ │ ├── sigma.layout.forceAtlas2.min.js │ │ └── sigma.min.js ├── heat-maps │ ├── font │ │ ├── digital7-webfont.eot │ │ ├── digital7-webfont.ttf │ │ ├── digital7-webfont.woff │ │ └── digital7.css │ ├── img │ │ └── basketball.png │ ├── index.html │ └── js │ │ ├── excanvas.min.js │ │ └── heatmap-mod.js ├── tree-maps │ ├── index.html │ └── js │ │ ├── raphael-min.js │ │ └── treemap-squared-0.5.min.js └── word-clouds │ ├── index.html │ └── wordcloud2.js ├── ch5 ├── chronoline │ ├── css │ │ ├── chronoline.css │ │ ├── jquery.qtip.css │ │ └── sprites.png │ ├── index.html │ └── js │ │ ├── chronoline.js │ │ ├── jquery.min.js │ │ ├── jquery.qtip.js │ │ └── raphael-min.js ├── javascript │ └── index.html └── timelinejs │ ├── css │ ├── fancybox_sprite.png │ ├── fancybox_sprite@2x.png │ ├── loading.gif │ ├── timeline.css │ ├── timeline.png │ └── timeline@2x.png │ ├── index.html │ └── js │ ├── jquery.min.js │ └── timeline.js ├── ch6 └── leaflet │ ├── css │ ├── leaflet.css │ └── normalize.css │ ├── images │ ├── layers-2x.png │ ├── layers.png │ ├── marker-icon-2x.png │ ├── marker-icon.png │ └── marker-shadow.png │ ├── index.html │ └── js │ └── leaflet.js ├── ch7 ├── chart │ └── index.html ├── force │ ├── data.json │ └── index.html ├── map │ ├── index.html │ ├── tornadoes.csv │ └── us-states.json └── sunburst │ ├── index.html │ └── tornadoes.csv └── running ├── .bowerrc ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .jshintrc ├── .yo-rc.json ├── Gruntfile.js ├── app ├── 404.html ├── data │ └── runs.json ├── favicon.ico ├── index.html ├── robots.txt ├── scripts │ ├── collections │ │ └── runs.js │ ├── main.js │ ├── models │ │ └── run.js │ ├── routes │ │ └── app.js │ ├── templates │ │ ├── charts.ejs │ │ ├── details.ejs │ │ ├── map.ejs │ │ ├── properties.ejs │ │ ├── summary.ejs │ │ └── summaryRow.ejs │ └── views │ │ ├── charts.js │ │ ├── details.js │ │ ├── map.js │ │ ├── properties.js │ │ ├── summary.js │ │ └── summaryRow.js └── styles │ └── main.css ├── bower.json └── package.json /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Stephen A Thomas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jsDataV.is-source 2 | ================= 3 | 4 | This repository contains source code for data visualizations on the [jsDataV.is](http://jsDataV.is) site, including those used as examples in the book [_Data Visualization with JavaScript_](http://www.nostarch.com/datavisualization). All code is available under MIT license and can be freely used without attribution (though attribution is always welcome). 5 | 6 | > Note: Chapters 8, 9, and 10 in the print and ebook versions (appendices A and B in the online version) are combined in a single `running` folder. 7 | -------------------------------------------------------------------------------- /ch1/bar-charts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Hurricane Katrina 2005: Course and Wind Strength
15 | 16 |Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.
17 | 18 | 19 | 20 | 133 | 134 | -------------------------------------------------------------------------------- /ch1/custom-charts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Select Regions to Include:
24 |11 | 12 | 170,134,115,128,168,166,122,81,56,39,97,114,114,130,151, 13 | 184,148,145,134,145,145,145,143,148,224,181,112,111,129, 14 | 151,131,131,131,114,112,112,112,124,187,202,200,203,237, 15 | 263,221,197,184,185,203,290,330,330,226,113,148,169,148, 16 | 78,96,96,96,77,59,22,22,70,110,128 17 | 18 | 128 19 | Glucose 20 |
21 | 22 | 23 | 24 | 25 | 39 | 40 | -------------------------------------------------------------------------------- /ch3/click-events/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Symbol | 14 |Company | 15 |2012 Performance | 16 |Annual Gain (Loss) | 17 |
---|---|---|---|
AAPL | 22 |Apple Inc. | 23 |418.68,416.11,416.6,443.34,455.63,489.08,497.7,517.81,540.38,540.37,580.42,590.8,594.27,628.1,599.9,567.94,597.69,560.27,561.72,525.71,557.34,556.05,575.21,569.08,576.98,578.86,600.55,599.64,598.98,580.01,610.28,618.87,645.16,660.2,662.22,677.35,688.14,696.91,664.07,649.62,626.85,607.07,601.25,574.18,547.06,527.68,571.5,585.28,533.25,509.79,519.33,509.59,532.17 | 24 |27% | 25 |
ALTR | 28 |Altera Corporation | 29 |37.1,36.92,39.93,39.81,40.43,39.76,39.73,38.55,36.89,37.68,39.18,38.47,39.49,37.85,37.17,34.95,35.26,33.4,33.53,33.03,34.21,32.09,33.29,32.86,33.24,33.64,32.54,31.16,31.04,35.82,35.58,37,36.23,36.23,37.21,37.85,38.03,36.62,33.89,33.32,32.22,32.4,30.3,30.41,30.64,30.45,31.86,32.39,31.58,32.86,34.5,34.01,34.39 | 30 |(7%) | 31 |
BMY | 34 |Bristol Meyers Squibb Co. | 35 |32.86,32.46,31.36,31.01,30.98,30.64,31.81,31.31,31.3,31.61,31.87,31.65,32.41,32.67,31.57,33.21,32.32,32.37,32.12,31.74,32.1,32.33,33.34,33.21,34.3,34.88,33.9,34.64,34.69,35.31,31.97,31.07,30.92,31.9,32.33,32.61,32.55,32.92,33.05,33.28,32.73,33.45,33.26,32.82,31.88,31.37,32.27,32.28,32.21,32.38,32.21,31.56,32.24 | 36 |(2%) | 37 |
BRKA | 40 |Berkshire Hathaway Inc. | 41 |114500,116520,119775,119211,119800,117980,119190,120000,117434,119065,122190,122170,121900,121295,118385,118580,120925,121950,122795,119850,119500,119845,122000,123375,122670,124945,123898,126625,125730,127735,128479,127175,128880,128225,126560,129942,133000,134584,132700,135555,132502,133841,129725,130550,127585,129345,132606,131916,131090,133795,134800,133000,134060 | 42 |17% | 43 |
COP | 46 |ConocoPhillips | 47 |52.95,51.26,51.89,50.58,51.35,52.65,53.95,55.85,57.1,56.74,56.76,56.26,55.9,55.42,54.15,53.59,52.93,51.29,51.61,49.65,50.91,50.01,52.73,54.18,52.18,54.59,53.49,53.71,55.34,54.34,55.07,56.62,56.73,55.71,56.14,55.99,57.54,56.7,56.52,56.92,56.17,57.45,57.31,57.65,55.67,55.03,56.67,56.94,57.94,57.69,58.61,57.07,57.99 | 48 |10% | 49 |
CTXS | 52 |Citrix Systems, Inc. | 53 |62.02,64.85,68.12,65.14,68.78,71.46,74.77,75.16,75.43,76.27,78.2,77.68,78.91,78.28,75.12,77.78,85.78,82.85,79.46,74.82,75.43,70.79,77.12,80.12,80.14,83.94,77.45,76.63,80.75,77.81,72.44,76.26,78.08,77,77.69,80.59,81.74,81.19,76.53,71.57,67.7,64.16,62.82,62.77,60.17,59.21,61.77,61.16,62.03,65.02,66.15,64.3,65.62 | 54 |6% | 55 |
CVX | 58 |Chevron Corporation | 59 |104.78,102.63,103.4,100.57,102.06,101.85,103.97,106.33,106.85,106.81,107.5,103.68,104.51,102.11,98.24,99.94,103.52,101.11,100.1,96.84,97.24,94.83,99.18,102.62,98.79,103.77,103.34,104.27,107.4,107.47,109.3,111.69,111.7,111.05,111.2,113.03,116.25,116.79,115.56,116.5,111.11,112.41,110.23,107.44,104.94,102.4,105.47,105.69,106.99,107.82,109.71,106.45,108.14 | 60 |3% | 61 |
F | 64 |Ford Motor Company | 65 |11.5,11.82,12.36,12.03,12.6,12.26,12.57,12.05,12.54,12.4,12.33,12.14,12.3,12.29,11.75,11.24,11.43,10.56,10.47,9.91,10.49,10.02,10.55,10.24,10.09,9.49,9.4,9.18,9.12,8.91,9.05,9.3,9.58,9.44,9.29,10.09,10.48,10.35,9.81,10.11,10.07,10.13,10.31,11.17,10.93,10.5,11.1,11.45,11.48,11.1,11.86,12.87,12.95 | 66 |13% | 67 |
FNMA | 70 |Federal National Mortgage Association | 71 |0.2,0.23,0.24,0.23,0.24,0.3,0.38,0.32,0.32,0.32,0.31,0.31,0.29,0.28,0.27,0.29,0.28,0.27,0.3,0.27,0.27,0.26,0.26,0.26,0.26,0.26,0.25,0.24,0.24,0.24,0.24,0.28,0.24,0.25,0.25,0.24,0.28,0.28,0.28,0.28,0.27,0.27,0.27,0.27,0.28,0.27,0.28,0.27,0.27,0.27,0.26,0.26,0.26 | 72 |30% | 73 |
GE | 76 |General Electric Company | 77 |18.03,18.21,18.51,18.39,18.38,18.25,18.64,18.76,18.5,18.57,19.7,19.29,19.57,19.01,18.41,18.88,19.29,18.86,18.54,18.48,18.72,18.08,18.72,19.5,19.48,20.5,19.67,19.44,19.54,20.57,20.61,20.75,20.65,20.46,20.37,21.23,21.74,22.33,22.5,22.91,22.28,21.83,20.92,21.12,20.81,19.97,20.85,20.94,21.27,21.42,20.88,20.44,20.99 | 78 |16% | 79 |
GLW | 82 |Corning Incorporated | 83 |13.18,13.64,14.05,12.3,13.23,13.25,13.49,13.4,12.73,13.02,14.04,13.74,13.8,13.27,13.31,12.91,14.16,13.39,13.04,12.49,12.65,12.43,12.94,12.82,12.67,12.74,12.61,12.14,12.09,11.36,11.18,11.4,11.82,11.35,11.89,12.45,13.01,13.11,13.04,13.19,12.88,13.41,11.72,11.61,11.25,10.9,11.29,12.23,12.54,12.62,12.6,12.47,12.62 | 84 |(4%) | 85 |
GM | 88 |General Motors Company | 89 |22.92,24.29,25,24.37,26.18,25.5,27.34,26.07,26.45,25.62,25.57,25.17,25.65,24.81,23.8,23.6,23.53,22.36,22,21.18,22.44,22.01,22.05,21.74,20.6,19.72,20.31,19.62,19.36,19.67,20.04,20.54,22.01,21.18,21.35,23.37,24.14,24.8,22.75,24.8,24.44,24.59,23.28,25.79,25.04,23.85,25.21,25.88,25.19,24.61,27.32,27.85,28.83 | 90 |26% | 91 |
HPQ | 94 |Hewlett-Packard Company | 95 |25.67,25.76,27.35,27.11,28.27,27.91,28.77,25.9,24.62,23.51,23.93,23.09,23.29,22.58,24.01,23.95,24.19,23.72,22.62,20.97,21.82,20.77,21.8,21.27,20.02,19.77,19.24,18.66,18.29,18.25,17.95,19.37,19.19,17.28,16.59,17.12,18,17.42,16.9,14.59,14.27,14.34,13.96,13.63,13.48,12.73,12.32,12.87,13.81,14.75,14.34,13.68,14.25 | 96 |(44%) | 97 |
QCOM | 100 |QUALCOMM, Inc. | 101 |55.28,55.65,56.83,56.88,60.1,60.76,61.54,62.45,61.66,63.14,64.61,65.86,67.22,66.36,65.85,61.49,63.39,61.15,61.1,55.29,56.62,54.68,58.29,56.05,55.19,55.23,54.87,54.54,57.22,58.86,59.76,61.48,62.78,61.93,60.97,61.69,64.62,64.02,62.22,62.39,58.66,58.52,58.81,59.07,61.38,61.69,62.88,63.37,63.86,59.83,61.61,60.64,61.86 | 102 |12% | 103 |
TER | 106 |Teradyne, Inc. | 107 |14.63,14.84,16.14,16.95,17.03,16.5,17.01,16.38,16.11,16.21,17.05,16.82,16.89,16.42,16.29,16.3,17.39,16.13,15.71,14.32,14.79,13.61,14.38,14.46,14.31,14.06,13.67,13.21,13.64,14.97,14.8,15.59,15.94,15.74,15.62,16.28,16.43,14.6,14.22,14.07,13.62,14.12,14.5,15.31,15.51,15.03,15.93,15.64,15.84,16.49,16.75,16.42,16.89 | 108 |15% | 109 |
TSLA | 112 |Tesla Motors Inc | 113 |26.91,22.79,26.6,29.33,31.15,31.1,34.97,33.75,34.04,34.74,35.32,34.08,37.24,34.48,33.59,33.16,33.34,31.83,32.25,27.56,29.81,28.15,30.08,29.91,33.79,31.29,30.99,34.25,31.79,29.51,27.27,29.94,30.01,29.5,28.52,29.35,30.39,30.02,29.28,28.89,27.64,27.74,27.38,28.92,30.32,31.84,32.13,33.82,34.17,33.81,34,33.22,33.87 | 114 |26% | 115 |
WMT | 118 |Wal-Mart Stores, Inc. | 119 |57.58,58.11,59.54,59.25,60.54,60.41,60.98,57.38,57.59,59.03,59.77,59.68,60.13,59.61,58.72,61.35,57.99,57.67,58.77,61.75,64.6,64.84,67.48,67.01,66.57,68.96,70.58,72.38,71.46,73.71,73.74,73.27,71.59,71.71,72.2,73.41,74.09,74.04,73.39,74.72,75.39,75.2,74.7,72.37,71.91,67.65,69.81,71.62,72.29,68.75,68.65,67.61,68.23 | 120 |18% | 121 |
XOM | 124 |Exxon Mobil Corporation | 125 |83.01,82.78,85.33,83.71,82.82,82.17,83.96,85.65,84.66,82.67,84.76,83.89,85.05,83.17,81.34,83.65,84.41,82.93,82.05,80.44,81.04,76.94,79.82,82.17,81.07,84.49,83.73,84.39,84.86,86.34,86.44,87.89,87.85,87.5,86.76,89.36,91.73,91.35,90.88,91.97,90.46,91.58,90.06,89.71,87.21,86.45,89.09,88.14,88.6,88.08,87.23,85.1,86.55 | 126 |4% | 127 |
Sorry, but the page you were trying to view does not exist.
146 |It looks like this was the result of either:
147 |Your content here.
2 | 3 | -------------------------------------------------------------------------------- /running/app/scripts/templates/properties.ejs: -------------------------------------------------------------------------------- 1 |