Created
April 22, 2015 06:40
-
-
Save danielatkin/1fae32ee511aaa956079 to your computer and use it in GitHub Desktop.
This file contains 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
state | provider | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
New South Wales | Charles Sturt University | 0.2072 | 0.2148 | 0.2014 | 0.212 | 0.2104 | 0.2296 | 0.2422 | 0.2199 | 0.2239 | 0.2333 | 0.2301 | 0.227 | |
New South Wales | Macquarie University | 0.1486 | 0.1386 | 0.1094 | 0.1041 | 0.118 | 0.117 | 0.1215 | 0.1124 | 0.1147 | 0.1207 | 0.1273 | 0.1476 | |
New South Wales | Southern Cross University | 0.3213 | 0.3327 | 0.2731 | 0.2773 | 0.2986 | 0.2617 | 0.2635 | 0.2274 | 0.263 | 0.2506 | 0.258 | 0.3021 | |
New South Wales | The University of Sydney | 0.1228 | 0.126 | 0.1168 | 0.1066 | 0.1061 | 0.1045 | 0.1065 | 0.099 | 0.1022 | 0.1057 | 0.1046 | 0.1116 | |
New South Wales | University of New England | 0.2667 | 0.2724 | 0.2584 | 0.2566 | 0.2475 | 0.2432 | 0.2386 | 0.2226 | 0.2504 | 0.2467 | 0.2598 | 0.2629 | |
New South Wales | University of New South Wales(d) | 0.1024 | 0.1051 | 0.0967 | 0.1047 | 0.1061 | 0.1082 | 0.1069 | 0.101 | 0.0896 | 0.1007 | 0.1019 | 0.0966 | |
New South Wales | University of Newcastle | 0.1473 | 0.1687 | 0.1528 | 0.1467 | 0.1602 | 0.1659 | 0.1793 | 0.1538 | 0.1652 | 0.1672 | 0.1793 | 0.1681 | |
New South Wales | University of Technology, Sydney | 0.1257 | 0.1222 | 0.1085 | 0.1184 | 0.1179 | 0.1184 | 0.1632 | 0.1159 | 0.1281 | 0.1157 | 0.1336 | 0.1296 | |
New South Wales | University of Western Sydney | 0.2061 | 0.1742 | 0.178 | 0.2133 | 0.1962 | 0.1779 | 0.1984 | 0.1845 | 0.192 | 0.198 | 0.2063 | 0.2134 | |
New South Wales | University of Wollongong | 0.1391 | 0.1414 | 0.1533 | 0.1312 | 0.1311 | 0.1438 | 0.1231 | 0.1054 | 0.1212 | 0.1396 | 0.1377 | 0.1341 | |
Victoria | Deakin University | 0.193 | 0.1917 | 0.1746 | 0.17 | 0.1725 | 0.1593 | 0.1593 | 0.152 | 0.144 | 0.1329 | 0.1486 | 0.1611 | |
Victoria | Federation University Australia(e) | 0.1746 | 0.1795 | 0.2183 | 0.2109 | 0.2073 | 0.2041 | 0.2134 | 0.2153 | 0.1774 | 0.2046 | 0.2347 | 0.2597 | |
Victoria | La Trobe University | 0.1977 | 0.2139 | 0.2055 | 0.1903 | 0.1727 | 0.1624 | 0.1817 | 0.1696 | 0.1557 | 0.1699 | 0.167 | 0.165 | |
Victoria | Monash University | 0.1342 | 0.1352 | 0.1222 | 0.1225 | 0.1179 | 0.1103 | 0.0965 | 0.0898 | 0.0935 | 0.1023 | 0.0999 | 0.0978 | |
Victoria | RMIT University | 0.1684 | 0.1743 | 0.1499 | 0.1596 | 0.1414 | 0.1503 | 0.1142 | 0.1312 | 0.1159 | 0.112 | 0.115 | 0.1144 | |
Victoria | Swinburne University of Technology | 0.1687 | 0.1796 | 0.1607 | 0.1651 | 0.1824 | 0.1562 | 0.1477 | 0.1706 | 0.1546 | 0.173 | 0.1752 | 0.2308 | |
Victoria | The University of Melbourne(f) | 0.1503 | 0.1634 | 0.1529 | 0.1448 | 0.078 | 0.0753 | 0.0735 | 0.0767 | 0.0621 | 0.0705 | 0.0739 | 0.0674 | |
Victoria | Victoria University | 0.2596 | 0.24 | 0.2414 | 0.2048 | 0.215 | 0.2121 | 0.2109 | 0.1856 | 0.2003 | 0.2245 | 0.1926 | 0.2236 | |
Queensland | Central Queensland University | 0.2084 | 0.2241 | 0.2446 | 0.2236 | 0.2978 | 0.3371 | 0.3155 | 0.3052 | 0.3062 | 0.2727 | 0.2828 | 0.3095 | |
Queensland | Griffith University | 0.1985 | 0.2365 | 0.2235 | 0.2184 | 0.2141 | 0.2072 | 0.214 | 0.1903 | 0.1914 | 0.2145 | 0.2003 | 0.2075 | |
Queensland | James Cook University | 0.2473 | 0.2655 | 0.2707 | 0.2646 | 0.2507 | 0.2564 | 0.2323 | 0.2266 | 0.2096 | 0.2216 | 0.2143 | 0.2315 | |
Queensland | Queensland University of Technology | 0.1725 | 0.1837 | 0.157 | 0.1738 | 0.1657 | 0.1728 | 0.1788 | 0.166 | 0.1494 | 0.1647 | 0.154 | 0.1574 | |
Queensland | The University of Queensland | 0.1527 | 0.1529 | 0.1557 | 0.1382 | 0.1512 | 0.16 | 0.1693 | 0.1346 | 0.1385 | 0.1418 | 0.1364 | 0.1389 | |
Queensland | University of Southern Queensland | 0.2711 | 0.2856 | 0.2667 | 0.2752 | 0.2658 | 0.2631 | 0.2468 | 0.2235 | 0.2313 | 0.2484 | 0.2434 | 0.2594 | |
Queensland | University of the Sunshine Coast | 0.326 | 0.3856 | 0.3883 | 0.3619 | 0.3497 | 0.3475 | 0.3151 | 0.2748 | 0.2635 | 0.2649 | 0.2744 | 0.2816 | |
Western Australia | Curtin University of Technology | 0.1551 | 0.1561 | 0.1394 | 0.1412 | 0.1622 | 0.1437 | 0.1633 | 0.1277 | 0.1235 | 0.1489 | 0.1365 | 0.1628 | |
Western Australia | Edith Cowan University | 0.2267 | 0.2182 | 0.2207 | 0.2097 | 0.2122 | 0.2112 | 0.2184 | 0.2038 | 0.198 | 0.2085 | 0.2096 | 0.2116 | |
Western Australia | Murdoch University | 0.1836 | 0.1955 | 0.188 | 0.2084 | 0.2064 | 0.2255 | 0.2138 | 0.1884 | 0.2071 | 0.1992 | 0.1725 | 0.1759 | |
Western Australia | The University of Western Australia | 0.1321 | 0.1172 | 0.1195 | 0.1103 | 0.1169 | 0.1082 | 0.1113 | 0.1168 | 0.1161 | 0.1139 | 0.1092 | 0.1169 | |
South Australia | Flinders University of South Australia | 0.2096 | 0.2119 | 0.1994 | 0.1875 | 0.1942 | 0.1767 | 0.1895 | 0.1774 | 0.1822 | 0.188 | 0.1838 | 0.1971 | |
South Australia | The University of Adelaide | 0.1691 | 0.1652 | 0.1626 | 0.1468 | 0.1525 | 0.1317 | 0.1362 | 0.1304 | 0.1325 | 0.1388 | 0.1436 | 0.1563 | |
South Australia | University of South Australia | 0.1844 | 0.1864 | 0.1709 | 0.1811 | 0.1771 | 0.1743 | 0.1676 | 0.1499 | 0.1427 | 0.1593 | 0.1784 | 0.1819 | |
Tasmania | Australian Maritime College(g) | 0.2727 | 0.2717 | 0.3023 | 0.3506 | 0.3019 | 0.1638 | |||||||
Tasmania | University of Tasmania(g) | 0.1717 | 0.1838 | 0.1728 | 0.1761 | 0.1538 | 0.1878 | 0.2001 | 0.1983 | 0.1716 | 0.1805 | 0.1981 | 0.2125 | |
Northern Territory | Batchelor Institute of Indigenous Tertiary Education(h) | 0.1 | 0.3617 | 0.3889 | 0.875 | 0.3171 | 0.3457 | 0.4045 | 0.4428 | 0.3977 | 0.5574 | 0.8864 | ||
Northern Territory | Charles Darwin University(h) | 0.3507 | 0.339 | 0.3369 | 0.3199 | 0.3154 | 0.3167 | 0.3085 | 0.3011 | 0.3038 | 0.3195 | 0.3074 | 0.3056 | |
Australian Capital Territory | The Australian National University | 0.1616 | 0.1605 | 0.1242 | 0.1102 | 0.1074 | 0.1037 | 0.1152 | 0.0957 | 0.0864 | 0.0935 | 0.0895 | 0.1149 | |
Australian Capital Territory | University of Canberra | 0.1882 | 0.1766 | 0.181 | 0.1674 | 0.1795 | 0.1894 | 0.187 | 0.1792 | 0.1759 | 0.1859 | 0.1938 | 0.1963 | |
Multi-State | Australian Catholic University | 0.2077 | 0.1976 | 0.1973 | 0.1798 | 0.1885 | 0.1588 | 0.1608 | 0.1809 | 0.1899 | 0.192 | 0.2236 | 0.2148 |
This file contains 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> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Attrition Time Series Line Chart</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="container"> | |
<div id="header"> | |
<h1 class="left">Attrition Rate(a) for all commencing bachelor students by State and Higher Education Institution(b), 2001 to 2012(c)</h1> | |
</div> | |
<div id="dropdowns"> | |
</div> | |
<div id = "wrapper"> | |
<div id="leftdiv"> | |
</div> | |
<script type="text/javascript"> | |
//Dimensions and padding | |
var w = 740; | |
var h = 630; | |
var padding = [ 20, 10, 50, 100 ]; //Top, right, bottom, left | |
//Set up date formatting and years | |
var dateFormat = d3.time.format("%Y"); | |
var percentformat = d3.format("%"); | |
//Set up scales | |
var xScale = d3.time.scale() | |
.range([ padding[3], w - padding[1] - padding[3] ]); | |
var yScale = d3.scale.linear() | |
.range([ padding[0], h - padding[2] - 30 ]); | |
//Configure axis generators | |
var xAxis = d3.svg.axis() | |
.scale(xScale) | |
.orient("bottom") | |
.ticks(12) | |
.tickFormat(function(d) { | |
return dateFormat(d); | |
}); | |
var yAxis = d3.svg.axis() | |
.scale(yScale) | |
.orient("left") | |
.tickFormat(function(d) { | |
return percentformat(d)}); | |
//Configure line generator | |
var line = d3.svg.line() | |
.x(function(d) { | |
return xScale(dateFormat.parse(d.year)); | |
}) | |
.y(function(d) { | |
return yScale(+d.rate); | |
}); | |
//Create the empty SVG image | |
var svg = d3.select("#leftdiv") | |
.append("svg") | |
.attr("width", w) | |
.attr("height", h); | |
//Load data | |
d3.csv("attritionTimeSeries.csv", function(data) { | |
//Data is loaded in, but we need to restructure it. | |
//Remember, each line requires an array of x/y pairs; | |
//that is, an array of arrays, like so: | |
// | |
// [ [x: 1, y: 1], [x: 2, y: 2], [x: 3, y: 3] ] | |
// | |
//We, however, are using 'year' as x and 'rate' as y. | |
//We also need to know which provider belongs to each | |
//line, so we will build an array of objects that is | |
//structured like this: | |
/* | |
[ | |
{ | |
provider: "Charles Sturt University", | |
attrition: [ | |
{ year: 2001, rate: 20.72 }, | |
{ year: 2002, rate: 21.48 }, | |
{ year: 2003, rate: 20.14 }, | |
… | |
] | |
}, | |
{ | |
provider: "Macquarie University", | |
attrition: [ | |
{ year: 2001, rate: 14.86 }, | |
{ year: 2002, rate: 13.86 }, | |
{ year: 2003, rate: 10.94 }, | |
… | |
] | |
}, | |
… | |
] | |
*/ | |
//Note that this is an array of objects. Each object | |
//contains two values, 'provider' and 'attrition'. | |
//The 'attrition' value is itself an array, containing | |
//more objects, each one holding 'year' and 'rate' values. | |
//New array with all the years, for referencing later | |
var years = ["2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013"]; | |
//Create a new, empty array to hold our restructured dataset | |
var dataset = []; | |
//Loop once for each row in data | |
for (var i = 0; i < data.length; i++) { | |
//Create new object with this provider's name and empty array | |
dataset[i] = { | |
provider: data[i].provider, | |
attrition: [] | |
}; | |
//Loop through all the years | |
for (var j = 0; j < years.length; j++) { | |
// If value is not empty | |
if (data[i][years[j]]) { | |
//Add a new object to the attrition data array | |
//for this provider | |
dataset[i].attrition.push({ | |
year: years[j], | |
rate: data[i][years[j]] | |
}); | |
} | |
} | |
} | |
//Uncomment to log the original data to the console | |
console.log(data); | |
//Uncomment to log the newly restructured dataset to the console | |
console.log(dataset); | |
//Set scale domains | |
xScale.domain([ | |
d3.min(years, function(d) { | |
return dateFormat.parse(d); | |
}), | |
d3.max(years, function(d) { | |
return dateFormat.parse(d); | |
}) | |
]); | |
yScale.domain([ | |
d3.max(dataset, function(d) { | |
return d3.max(d.attrition, function(d) { | |
return +d.rate; | |
}); | |
}), | |
0 | |
]); | |
//Make a group for each provider | |
var groups = svg.selectAll("g") | |
.data(dataset) | |
.enter() | |
.append("g"); | |
//Append a title with the provider name (so we get easy tooltips) | |
groups.append("title") | |
.text(function(d) { | |
return d.provider; | |
}); | |
//Within each group, create a new line/path, | |
//binding just the attrition data to each one | |
groups.selectAll("path") | |
.data(function(d) { | |
return [ d.attrition ]; | |
}) | |
.enter() | |
.append("path") | |
.attr("class", "line") | |
.attr("d", line) | |
.attr("fill", "none") | |
.attr("stroke", "#95a5a6") | |
.attr("stroke-width", 2) | |
.on("mouseover", mouseover) | |
.on("mouseout", mouseout); | |
function mouseover (d) { | |
var coordinates = [0, 0]; | |
coordinates = d3.mouse(this); | |
var x = coordinates[0]; | |
var y = coordinates[1] + 86; | |
d3.select(this) //on mouseover of each line, give it a nice thick stroke | |
.attr("fill", "none") | |
.attr("stroke", "#e74c3c") | |
.attr("stroke-width", 3); | |
} | |
function mouseout (d) { | |
d3.select(this) | |
.attr("fill", "none") | |
.attr("stroke", "#95a5a6") | |
.attr("stroke-width", 2); | |
d3.select("#tooltip").classed("hidden", true); | |
} | |
//Axes | |
svg.append("g") | |
.attr("class", "x axis") | |
.attr("transform", "translate(0," + (h - padding[2]) + ")") | |
.call(xAxis); | |
svg.append("g") | |
.attr("class", "y axis") | |
.attr("transform", "translate(" + (padding[3]) + ",0)") | |
.call(yAxis); | |
}); | |
</script> | |
</div> | |
<div id="rightdiv"> | |
<p class="left">(a) Attrition rate for year(x) is the proportion of students who commenced a bachelor course in year(x) who neither complete nor return in year(x + 1).</p></br> | |
<p class="left">(b) Includes only Public Universities (Table A).</p></br> | |
<p class="left">(c) Figures are based on full year data.</p></br> | |
<p class="left">(d) Data for the Australian Defence Force Academy data are included under University of New South Wales in this publication (for all years). Australian Defence Force Academy was excluded in the corresponding tables in previous years.</p></br> | |
<p class="left">(e) Previously University of Ballarat.</p></br> | |
<p class="left">(f) Prior to 2006 The University of Melbourne classified Study Abroad students as award. These were re-classififed in 2006 to non-award, removing them from the scope of Retention calculation and affecting the rates.</p></br> | |
<p class="left">(g) The Australian Maritime College is reported as a part of the University of Tasmania from 2008. These were previously reported separately.</p></br> | |
<p class="left">(h) As a result of a collaborative partnership between Batchelor Institute of Indigenous Tertiary Education and Charles Darwin University which established The Australian Centre for Indigenous Knowledge and Education (ACIKE),</p></br> | |
<p class="left">(i) Attrition rate (normal calculation) is based on a match process using the students' StudentID. This gives a "crude" attrition rate, which identifies students that neither complete a course nor are retained the following year at the same institution.</p> | |
</div> | |
<div id="source"> | |
<p>SOURCE: <a href="https://education.gov.au/selected-higher-education-statistics-2013-student-data">Department of Education: selected higher education statistics 2013</a>.</p> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains 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
body { | |
font-family: helvetica, calibri, arial, sans-serif; | |
font-size: 11px; | |
} | |
h1 { | |
margin: 0; | |
padding-left: 10px; | |
padding: 0; | |
} | |
h2 { | |
margin: 0; | |
padding: 0; | |
} | |
p { | |
margin: 0; | |
padding: 0; | |
} | |
svg { | |
background-color: none; | |
text-align: center; | |
} | |
circle { | |
fill: #2c3e50; | |
border-color: #95a5a6; | |
border-width: 2px; | |
} | |
circle:hover { | |
fill: #1abc9c; | |
} | |
.left { | |
text-align: left; | |
} | |
.axis path, | |
.axis line { | |
fill: none; | |
stroke: #95a5a6; | |
stroke-dasharray:2,1; | |
shape-rendering: crispEdges; | |
opacity: 0.7; | |
} | |
.axis text { | |
font-family: sans-serif; | |
font-size: 11px; | |
} | |
#container { | |
width: 1000px; | |
height: 720px; | |
margin: 0; | |
padding: 0; | |
border: 1px solid #7f8c8d; | |
} | |
#wrapper { | |
width: 1000px; | |
margin: 0; | |
padding: 0; | |
} | |
#leftdiv { | |
width:740px; | |
padding: none; | |
margin: none; | |
margin-top: 10px; | |
margin-right: 10px; | |
margin-bottom: 10px; | |
height: 600px; | |
float: left; | |
} | |
#rightdiv{ | |
width: 230px; | |
padding-top: 20px; | |
padding-left: 10px; | |
padding-right: 10px; | |
padding-bottom: 10px; | |
margin: none; | |
margin-top: 10px; | |
margin-bottom: 10px; | |
height: 570px; | |
float: left; | |
text-align: left; | |
} | |
#header { | |
text-align: center; | |
font-family: helvetica, calibri, arial, sans-serif; | |
text-decoration: bold; | |
padding-left: 10px; | |
padding-bottom: 10px; | |
padding-top: 10px; | |
width: 990px; | |
background-color: #ffffff; | |
color: #000000; | |
} | |
#source { | |
padding-left: 10px; | |
font-family: helvetica, calibri, arial, sans-serif; | |
font-size:10px; | |
color: #95a5a6} | |
rect:hover { | |
fill: orange; | |
} | |
#tooltip { | |
position: absolute; | |
height: auto; | |
padding: 10px; | |
background-color: #3498db; | |
-webkit-border-radius: 10px; | |
-moz-border-radius: 10px; | |
border-radius: 10px; | |
-webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4); | |
-moz-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4); | |
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4); | |
pointer-events: none; | |
} | |
#tooltip.hidden { | |
display: none; | |
} | |
#tooltip p { | |
margin: 0; | |
font-family: helvetica, calibri, arial, sans-serif; | |
font-size: 11px; | |
line-height: 15px; | |
color: #ffffff; | |
} | |
a[title]:hover:after { | |
content: attr(title); | |
padding: 4px 8px; | |
color: #333; | |
position: absolute; | |
left: 0; | |
top: 100%; | |
white-space: nowrap; | |
z-index: 20px; | |
-moz-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
border-radius: 5px; | |
-moz-box-shadow: 0px 0px 4px #222; | |
-webkit-box-shadow: 0px 0px 4px #222; | |
box-shadow: 0px 0px 4px #222; | |
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); | |
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #eeeeee),color-stop(1, #cccccc)); | |
background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); | |
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); | |
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); | |
background-image: -o-linear-gradient(top, #eeeeee, #cccccc); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment