Skip to content

Instantly share code, notes, and snippets.

@curran
Last active September 19, 2017 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curran/be91b0deb8b7810f3ba768dfc0ffbb49 to your computer and use it in GitHub Desktop.
Save curran/be91b0deb8b7810f3ba768dfc0ffbb49 to your computer and use it in GitHub Desktop.
[unlisted] Test
license: mit

This data is from College Scorecard, which prospective students can use to make finding the right college easier. Within this data set are details like school size, cost, degree types, graduation rates, and average salary post-graduation for thousands of colleges and universities.

This data set uses the Creative Commons CCZero license and is intended for public access and use.

forked from curran's block: Data Table Summary

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Data Summary</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/datalib@1.8.0/datalib.min.js"></script>
<style>
</style>
</head>
<body>
<script>
// Use these for other formats:
// d3.tsv('data.tsv', data => {
// d3.json('data.json', data => {
// Load and summarize the data.
d3.csv('Most-Recent-Cohorts-Scorecard-Elements.csv', data => {
// Assemble a summary string.
const summary = [
'Data table summary: ',
data.length + ' rows',
data.columns.length + ' columns',
Math.round(d3.csvFormat(data).length / 1024) + ' kB',
'\nSummary of each column:',
dl.format.summary(data)
].join('\n');
// Show the summary string on the page.
d3.select('body').append('pre').text(summary);
// Log the summary to the console.
console.log(summary);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment