If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| country | median_age | gdp | edu_index | |
|---|---|---|---|---|
| Afghanistan | 18 | 18949 | 0.354 | |
| Albania | 30.2 | 13000 | 0.886 | |
| Algeria | 27.1 | 198735 | 0.748 | |
| Andorra | 39.9 | 3577 | 0.878 | |
| Antigua and Barbuda | 30 | 1118 | 0.945 | |
| Argentina | 30.3 | 448165 | 0.946 | |
| Australia | 37.5 | 1515468 | 0.993 | |
| Austria | 42.6 | 418031 | 0.962 | |
| Azerbaijan | 28.5 | 63404 | 0.881 |
| <div class="visualize"></div> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script> |
| define(function (require) { | |
| var d3 = require("d3"); | |
| return function split() { | |
| var splitBy = function (d) { return d; }; | |
| var element = "div"; | |
| var elementClass = function () { return "horizontal"; }; | |
| var predicate = false; | |
| function layout(selection) { |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <style> | |
| body { | |
| font: 10px sans-serif; | |
| } | |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
Forked from Captain Anonymous's Pen oXpoev.
Forked from Captain Anonymous's Pen oXpoev.
A Pen by Shelby Sturgis on CodePen.
Forked from Captain Anonymous's Pen oXpoev.
A Pen by Shelby Sturgis on CodePen.
| function barChart() { | |
| var key = function (d) { return d.key; }; | |
| var margin = { top: 20, right: 20, left: 20, bottom: 20 }; | |
| var width = 500; | |
| var height = 500; | |
| var xScale = d3.scale.linear(); | |
| var yScale = d3.scale.ordinal(); | |
| var yAxis = d3.svg.axis().orient('left').tickSize(0); | |
| var sort = function (a, b) { return a.count - b.count; }; | |
| var padding = 0.1; |
| <!DOCTYPE html> | |
| <html> | |
| <meta charset="utf-8"> | |
| <style> | |
| path { | |
| fill: none; | |
| stroke: #000000; | |
| stroke-linejoin: round; | |
| stroke-linecap: round; | |
| } |
| [ | |
| { "abbr": "ad", "name": "Andorra", "leb": 84.2, "pop": 79200, "size": 468 }, | |
| { "abbr": "al", "name": "Albania", "leb": 74, "pop": 2887000, "size": 28748 }, | |
| { "abbr": "at", "name": "Austria", "leb": 81.5, "pop": 8608000, "size": 83858 }, | |
| { "abbr": "ba", "name": "Bosnia and Herzegovina", "leb": 76, "pop": 3750000, "size": 51129 }, | |
| { "abbr": "be", "name": "Belgium", "leb": 81, "pop": 11259000, "size": 30510 }, | |
| { "abbr": "bg", "name": "Bulgaria", "leb": 74.5, "pop": 7265000, "size": 110910 }, | |
| { "abbr": "by", "name": "Belaurs", "leb": 72.5, "pop": 9481000, "size": 207600 }, | |
| { "abbr": "ch", "name": "Switzerland", "leb": 82.8, "pop": 8081000, "size": 41290 }, | |
| { "abbr": "cy", "name": "Cyprus", "leb": 81.2, "pop": 876000, "size": 9251 }, |