Skip to content

Instantly share code, notes, and snippets.

@jjhanlon
Created November 9, 2013 00:59
Show Gist options
  • Save jjhanlon/7380062 to your computer and use it in GitHub Desktop.
Save jjhanlon/7380062 to your computer and use it in GitHub Desktop.
InternetUsage Head/Tail
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://cdn.oesmith.co.uk/morris-0.4.2.min.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js' type='text/javascript'></script>
<script src='http://cdn.oesmith.co.uk/morris-0.4.2.min.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 800px;
height: 400px;
}
</style>
</head>
<body>
<div id='chart14df573407b3' class='rChart morris'></div>
<script type='text/javascript'>
var chartParams = {
"element": "chart14df573407b3",
"width": 800,
"height": 400,
"xkey": "year",
"ykeys": [
"Afghanistan",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Viet Nam",
"Virgin Islands (US)",
"Wallis and Futuna",
"Yemen",
"Zambia",
"Zimbabwe"
],
"data": [
{
"year": "2000",
"Afghanistan": 0,
"Albania": 0.11,
"Algeria": 0.49,
"American Samoa": 0,
"Andorra": 10.54,
"Angola": 0.11,
"Viet Nam": 0.25,
"Virgin Islands (US)": 13.82,
"Wallis and Futuna": 4.77,
"Yemen": 0.08,
"Zambia": 0.19,
"Zimbabwe": 0.4
},
{
"year": "2001",
"Afghanistan": 0,
"Albania": 0.33,
"Algeria": 0.65,
"American Samoa": 0,
"Andorra": 0,
"Angola": 0.14,
"Viet Nam": 1.27,
"Virgin Islands (US)": 18.38,
"Wallis and Futuna": 5.09,
"Yemen": 0.09,
"Zambia": 0.23,
"Zimbabwe": 0.8
},
{
"year": "2002",
"Afghanistan": 0,
"Albania": 0.39,
"Algeria": 1.59,
"American Samoa": 0,
"Andorra": 11.26,
"Angola": 0.27,
"Viet Nam": 1.85,
"Virgin Islands (US)": 27.49,
"Wallis and Futuna": 5.42,
"Yemen": 0.52,
"Zambia": 0.48,
"Zimbabwe": 3.99
},
{
"year": "2003",
"Afghanistan": 0.09,
"Albania": 0.97,
"Algeria": 2.2,
"American Samoa": 0,
"Andorra": 13.55,
"Angola": 0.37,
"Viet Nam": 3.78,
"Virgin Islands (US)": 27.43,
"Wallis and Futuna": 5.74,
"Yemen": 0.6,
"Zambia": 0.98,
"Zimbabwe": 6.39
},
{
"year": "2004",
"Afghanistan": 0.11,
"Albania": 2.42,
"Algeria": 4.63,
"American Samoa": 0,
"Andorra": 26.84,
"Angola": 0.46,
"Viet Nam": 7.64,
"Virgin Islands (US)": 27.38,
"Wallis and Futuna": 6.06,
"Yemen": 0.88,
"Zambia": 2.01,
"Zimbabwe": 6.56
},
{
"year": "2005",
"Afghanistan": 1.22,
"Albania": 6.04,
"Algeria": 5.84,
"American Samoa": 0,
"Andorra": 37.61,
"Angola": 1.14,
"Viet Nam": 12.74,
"Virgin Islands (US)": 27.34,
"Wallis and Futuna": 6.7,
"Yemen": 1.05,
"Zambia": 2.85,
"Zimbabwe": 8.02
},
{
"year": "2006",
"Afghanistan": 2.11,
"Albania": 9.61,
"Algeria": 7.38,
"American Samoa": 0,
"Andorra": 48.94,
"Angola": 1.91,
"Viet Nam": 17.25,
"Virgin Islands (US)": 27.33,
"Wallis and Futuna": 7.33,
"Yemen": 1.25,
"Zambia": 4.16,
"Zimbabwe": 9.79
},
{
"year": "2007",
"Afghanistan": 1.9,
"Albania": 15.04,
"Algeria": 9.45,
"American Samoa": 0,
"Andorra": 70.87,
"Angola": 3.2,
"Viet Nam": 20.76,
"Virgin Islands (US)": 27.34,
"Wallis and Futuna": 7.95,
"Yemen": 5.01,
"Zambia": 4.87,
"Zimbabwe": 10.85
},
{
"year": "2008",
"Afghanistan": 1.84,
"Albania": 23.86,
"Algeria": 10.18,
"American Samoa": 0,
"Andorra": 70.04,
"Angola": 4.6,
"Viet Nam": 23.92,
"Virgin Islands (US)": 27.36,
"Wallis and Futuna": 8.22,
"Yemen": 6.89,
"Zambia": 5.55,
"Zimbabwe": 11.4
},
{
"year": "2009",
"Afghanistan": 3.55,
"Albania": 41.2,
"Algeria": 11.23,
"American Samoa": 0,
"Andorra": 78.53,
"Angola": 6,
"Viet Nam": 26.55,
"Virgin Islands (US)": 27.4,
"Wallis and Futuna": 6.76,
"Yemen": 9.96,
"Zambia": 6.31,
"Zimbabwe": 11.36
},
{
"year": "2010",
"Afghanistan": 4,
"Albania": 45,
"Algeria": 12.5,
"American Samoa": 0,
"Andorra": 81,
"Angola": 10,
"Viet Nam": 30.65,
"Virgin Islands (US)": 31.22,
"Wallis and Futuna": 8.16,
"Yemen": 12.35,
"Zambia": 10,
"Zimbabwe": 11.5
},
{
"year": "2011",
"Afghanistan": 5,
"Albania": 49,
"Algeria": 14,
"American Samoa": 0,
"Andorra": 81,
"Angola": 14.78,
"Viet Nam": 35.07,
"Virgin Islands (US)": 35.6,
"Wallis and Futuna": 8.68,
"Yemen": 14.91,
"Zambia": 11.5,
"Zimbabwe": 15.7
},
{
"year": "2012",
"Afghanistan": 5.45,
"Albania": 54.66,
"Algeria": 15.23,
"American Samoa": 0,
"Andorra": 86.43,
"Angola": 16.94,
"Viet Nam": 39.49,
"Virgin Islands (US)": 40.55,
"Wallis and Futuna": 8.95,
"Yemen": 17.45,
"Zambia": 13.47,
"Zimbabwe": 17.09
}
],
"pointSize": 0,
"lineWidth": 1,
"id": "chart14df573407b3",
"labels": [ "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Viet Nam", "Virgin Islands (US)", "Wallis and Futuna", "Yemen", "Zambia", "Zimbabwe" ]
},
chartType = "Line"
new Morris[chartType](chartParams)
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment