Skip to content

Instantly share code, notes, and snippets.

@BMPMS
BMPMS / README.md
Last active December 14, 2016 15:21
PISA Visualisation

Objective: Visualise the PISA 2012 summary data in the best possible way.

Description: Data Analyst Nanodegree assignment. The PISA survey gathers a huge amount of data which you could devote a lifetime to analysing.

Data: My visualisation is an attempt to improve on the official key findings snapshot that can be found here (http://www.oecd.org/pisa/keyfindings/PISA-2012-results-snapshot-Volume-I-ENG.pdf). The data I used was a combination from three spreadsheets provided by PISA: summary data (http://dx.doi.org/10.1787/888932937035), reading additional data academic level (http://dx.doi.org/10.1787/888932935705) and science additional data academic level (http://dx.doi.org/10.1787/888932935724).

Process:

  1. Download, clean and reformat data using pisa_map.py, final formatted data in pisa_map_data.csv
  2. Download world_countries.json and check that the country names match those in my data
@BMPMS
BMPMS / index.html
Created June 20, 2016 09:01
Red Wine Analysis
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1">
@BMPMS
BMPMS / dvis.html
Last active July 18, 2016 15:41
Test website
<html>
<head>
</head>
<body>
<style>
table{
width: 800px;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
@BMPMS
BMPMS / balance.html
Last active October 18, 2016 13:14
Bank of England
<!DOCTYPE html>
<meta charset="utf-8">
<style> /* set the CSS */
</style>
<body>
<!-- load the d3.js library -->
<link rel="stylesheet" type="text/css" href="popups.css" media="screen" />
@BMPMS
BMPMS / d3.legend.js
Last active October 18, 2016 11:29
Sustainix Top 100 Rankings
// d3.legend.js
// (C) 2012 ziggy.jonsson.nyc@gmail.com
// MIT licence
(function() {
d3.legend = function(g) {
g.each(function() {
var g= d3.select(this),
items = {},
svg = d3.select(g.property("nearestViewportElement")),
@BMPMS
BMPMS / boom_style.css
Last active November 24, 2016 11:12
Donut Chart
/*general */
text {
font: 10px sans-serif;
}
/*tooltip */
@BMPMS
BMPMS / boom_style.css
Created November 24, 2016 11:14
Waterfall
/*general */
text {
font: 10px sans-serif;
}
/*tooltip */
@BMPMS
BMPMS / index.html
Last active December 14, 2016 17:16
2015 PISA
<!DOCTYPE html>
<html>
<title>PISA 2015 Visualisation</title>
<link rel="stylesheet" type="text/css" href="pisa.css" media="screen" />
<head>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="pisa.js"></script>
@BMPMS
BMPMS / README.md
Last active January 7, 2017 10:31
Bath Air Quality Dashboard

Air Quality Dashboard using data from Bath Hacked Data Store.

The dashboard looks at average NO2 and PM10 readings over two complete years of data - 2015 and 2016 - from four different air sensors.

Report on Sensor Data Errors can be found here.

GIST includes 7 files:

  • air_vis.py - python file which wrangles data into required format
  • all_data.csv - chart data initally formatted to fit adapted Peter Cook circular heat map also used for line chart
@BMPMS
BMPMS / hygiene.css
Last active March 28, 2017 12:07
Map Error
table,th,td {
font-family: Roboto;
font-size: 22px;
border: 1px solid black;
width: 100%;
}
#my_map {
width: 100%;
height: 600px;
margin: 0;