Skip to content

Instantly share code, notes, and snippets.

@mbaba
Created May 7, 2015 10:36
Show Gist options
  • Save mbaba/8bba19ef691cda2a00c8 to your computer and use it in GitHub Desktop.
Save mbaba/8bba19ef691cda2a00c8 to your computer and use it in GitHub Desktop.
Unemployment rate in Poland
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<link rel="stylesheet" type="text/css" href="main.css">
<title>Unemployment Rate in Poland</title>
</head>
<body>
<div id="wrapper">
<div class="text">
<h1>Unemployment Rate in Poland - 2010-2014</h1>
</div>
<div class="text">
<p>
This chart shows monthly average of unemployment rate in Poiland.
</p>
<p>
<strong>Data description</strong><br />
The Unemployment - LFS adjusted seriesis a collection of monthly, quarterly and annual series based on the quarterly results of the EU Labour Force Survey (EU-LFS).<br /><br />
<strong>Statistical concepts and definitions</strong><br />
<strong>Unemployed persons</strong> are all persons 15 to 74 years of age who were not employed during the reference week, had actively sought work during the past four weeks and were ready to begin working immediately or within two weeks. The <strong>unemployment rate</strong> is the number of people unemployed as a percentage of the labour force. The labour force is the total number of people employed and unemployed.
</p>
<p>
Data source: <a href="http://ec.europa.eu/eurostat/data/database" target=" _blank">Eurostat</a>
</p>
</div>
<script type="text/javascript">
var w = 800;
var h = 600;
var padding = [20, 30, 45, 50];
d3.select("div", "#wrapper")
.append("div")
.attr("id", "col");
var svg = d3.select("#col")
.append("svg")
.attr("width", w)
.attr("height", h);
var dateFormat = d3.time.format("%m-%Y");
var xScale = d3.time.scale()
.range([ padding[3], w - padding[1] - padding[3] ]);
var yScale = d3.scale.linear()
.range([ padding[0], h - padding[2] ]);
var xAxis = d3.svg.axis()
.scale(xScale)
.orient("bottom")
.ticks(10)
.tickFormat(function(d) {
return dateFormat(d);
});
var yAxis = d3.svg.axis()
.scale(yScale)
.orient("left")
.tickFormat(function(d) {
return d + "%";
});
var line = d3.svg.line()
.x(function(d) {
return xScale(dateFormat.parse(d.date));
})
.y(function(d) {
return yScale(d.total);
});
d3.csv("une_rt_pl.csv", function(data) {
xScale.domain([
d3.min(data, function(d) {
return dateFormat.parse(d.date);
}),
d3.max(data, function(d) {
return dateFormat.parse(d.date);
})
]);
yScale.domain([
d3.max(data, function(d) {
return +d.total;
}),
0
]);
svg.data([ data ])
.append("path")
.attr("class", "line total")
.attr("d", line)
.attr("fill", "none")
.attr("stroke", "red")
.attr("stroke-width", 2);
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + (h - padding[2] + 10) + ")")
.call(xAxis);
svg.append("g")
.attr("class", "y axis")
.attr("transform", "translate(" + (padding[3] - 10) + ",0)")
.call(yAxis);
});
</script>
</div>
</body>
</html>
body {
background-color: #d2d0cc;
font-family: Helvetica, Arial, sans-serif;
font-size: 16px;
}
h1 {
font-size: 28px;
font-weight: bold;
font-variant: small-caps;
text-align: center;
line-height: 14px;
color: dimgrey;
}
a {
text-decoration: none;
}
a:link, a:visited {
color: dimgrey;
border-bottom: 2px dotted dimgrey;
}
a:hover {
color: #ffc04c;
border-bottom: 2px dotted #ffc04c;
}
.text {
padding: 1px 1%;
margin: auto;
margin-bottom: 25px;
width: 75%;
background-color: #ededeb;
}
.axis path, .axis line {
fill: none;
stroke: dimgrey;
shape-rendering: crispEdges;
}
.axis text, .label {
font-family: Helvetica, Arial, sans-serif;
font-size: 11px;
fill: dimgrey;
}
.label {
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
letter-spacing: 2px;
fill: dimgrey;
}
#wrapper {
width: 85%;
height: 100%;
margin: 0 auto;
position: relative;
}
#col {
padding: 1px 1%;
margin: 0 auto;
width: 75%;
background-color: #ededeb;
}
#container {
float: left;
width: 75%;
padding: 1px 1%;
margin-left: 1%;
margin-right: 1%;
margin-bottom: 25px;
background-color: #ededeb;
text-align: center;
}
svg {
fill: #ff7b00;
}
date total males females under_25 males_under_25 females_under_25 25_to_74 males_25_to_74 females_25_to_74
01-2000 15.3 13.6 17.4 34.3 32.7 36.2 12.7 11 14.7
02-2000 15.6 13.8 17.7 34.9 33.1 36.8 12.9 11.2 15
03-2000 15.9 14 18 35.3 33.5 37.3 13.1 11.4 15.2
04-2000 16 14.2 18.2 35.7 33.9 37.7 13.3 11.5 15.4
05-2000 16.2 14.4 18.3 35.9 34.1 37.8 13.4 11.6 15.5
06-2000 16.2 14.4 18.3 35.7 34 37.7 13.4 11.6 15.5
07-2000 16.3 14.5 18.4 35.4 33.8 37.4 13.5 11.7 15.6
08-2000 16.3 14.5 18.4 35.2 33.5 37.1 13.5 11.7 15.6
09-2000 16.4 14.6 18.4 35 33.4 37 13.6 11.8 15.7
10-2000 16.5 14.7 18.6 35 33.3 37.1 13.6 11.8 15.7
11-2000 16.6 14.9 18.7 35.2 33.3 37.4 13.7 12 15.8
12-2000 16.8 15.1 18.9 35.5 33.7 37.7 13.9 12.1 15.9
01-2001 17.2 15.5 19.1 36.2 34.4 38.4 14 12.4 16
02-2001 17.4 15.8 19.3 37 35.2 39.2 14.2 12.6 16.1
03-2001 17.7 16.2 19.5 37.9 36.1 40 14.4 12.9 16.1
04-2001 18 16.6 19.7 38.7 37 40.6 14.7 13.3 16.3
05-2001 18.2 16.8 19.7 39.2 37.8 41 14.8 13.5 16.3
06-2001 18.3 17 19.8 39.7 38.4 41.2 14.9 13.6 16.4
07-2001 18.3 17 19.9 40 38.8 41.5 14.9 13.5 16.5
08-2001 18.4 17.1 20 40.4 39.3 41.7 15 13.6 16.6
09-2001 18.6 17.3 20.2 40.8 39.9 42 15.1 13.7 16.7
10-2001 18.9 17.6 20.4 41.4 40.6 42.2 15.3 14 16.9
11-2001 19.1 17.9 20.5 41.7 41.1 42.4 15.6 14.3 17.1
12-2001 19.3 18.2 20.6 41.6 41 42.3 15.8 14.6 17.2
01-2002 19.4 18.4 20.6 41.4 40.6 42.3 16 14.9 17.3
02-2002 19.6 18.6 20.7 41.3 40.4 42.4 16.2 15.1 17.4
03-2002 19.7 18.8 20.8 41.5 40.5 42.7 16.3 15.3 17.5
04-2002 19.9 19.1 20.9 41.8 40.8 43 16.5 15.6 17.6
05-2002 19.7 19.1 20.4 41.5 40.9 42.4 16.3 15.7 17.1
06-2002 20 19.3 20.8 42.1 41 43.4 16.6 15.9 17.4
07-2002 20.2 19.3 21.2 42.6 41 44.6 16.7 15.9 17.7
08-2002 20.3 19.3 21.4 43.1 41.6 45 16.7 15.8 17.8
09-2002 20.4 19.5 21.4 43.6 42.6 44.8 16.8 15.9 17.8
10-2002 20.3 19.7 21.2 44.1 44.1 44 16.7 15.9 17.8
11-2002 20.3 19.7 20.9 44.1 44.8 43.2 16.7 15.9 17.7
12-2002 20.2 19.6 20.8 43.7 44.5 42.6 16.7 15.9 17.6
01-2003 20 19.4 20.7 42.9 43.4 42.2 16.6 15.7 17.6
02-2003 19.8 19.2 20.6 42.4 42.4 42.4 16.5 15.6 17.5
03-2003 19.7 19 20.6 42 41.5 42.7 16.4 15.5 17.4
04-2003 19.6 18.9 20.5 41.7 40.5 43.2 16.3 15.5 17.2
05-2003 19.6 18.8 20.5 41.5 40 43.5 16.2 15.4 17.2
06-2003 19.7 18.9 20.6 41.8 40.3 43.9 16.3 15.5 17.2
07-2003 19.9 19.1 20.8 42.4 41.2 44 16.4 15.6 17.4
08-2003 19.9 19.1 20.8 42.5 41.5 43.9 16.5 15.6 17.5
09-2003 19.8 19.1 20.7 42.1 41.1 43.4 16.5 15.6 17.5
10-2003 19.7 19 20.6 41.5 40.3 43.1 16.4 15.6 17.4
11-2003 19.7 19 20.6 41.2 39.7 43.1 16.5 15.8 17.3
12-2003 19.8 19.1 20.6 41.2 39.4 43.4 16.6 16 17.3
01-2004 20 19.4 20.7 41.6 39.6 44.1 16.7 16.2 17.3
02-2004 19.9 19.3 20.7 41.6 39.5 44.3 16.7 16.1 17.3
03-2004 19.8 19.1 20.7 41.4 39.4 44 16.6 16 17.3
04-2004 19.5 18.7 20.5 40.9 39 43.2 16.4 15.6 17.3
05-2004 19.3 18.4 20.3 40.3 38.8 42.3 16.2 15.4 17.2
06-2004 19.2 18.4 20.1 40 38.7 41.7 16.2 15.4 17.1
07-2004 19 18.4 19.8 39.5 38.3 41 16.1 15.4 16.9
08-2004 18.9 18.2 19.7 38.9 37.5 40.6 16 15.3 16.8
09-2004 18.7 17.9 19.6 38.2 36.5 40.5 15.9 15.2 16.7
10-2004 18.6 17.7 19.7 37.7 35.3 40.8 15.8 15 16.7
11-2004 18.4 17.3 19.7 37.5 34.7 41 15.6 14.7 16.8
12-2004 18.3 17 19.8 37.5 34.7 41.2 15.5 14.3 16.9
01-2005 18 17.1 19.2 36.9 34.6 40 15.3 14.5 16.4
02-2005 18.3 16.8 20.1 38 34.7 42.1 15.4 14.1 17
03-2005 18.4 17.3 19.8 38.9 37.1 41.2 15.5 14.3 16.8
04-2005 18.6 17.1 20.3 39.4 37.5 41.8 15.6 14.1 17.3
05-2005 18.5 17.3 20 39.1 38 40.6 15.6 14.2 17.1
06-2005 18.3 17.2 19.7 38.4 37.8 39.1 15.5 14.2 17
07-2005 18 16.9 19.4 36.9 36.7 37.3 15.4 14 16.9
08-2005 17.7 16.6 19.1 36 35.7 36.2 15.2 13.8 16.8
09-2005 17.5 16.4 18.8 35.4 35 35.8 15 13.7 16.5
10-2005 17.3 16.2 18.5 35.1 34.5 36 14.7 13.6 16.1
11-2005 17 16 18.2 34.8 34 35.8 14.5 13.4 15.8
12-2005 16.6 15.7 17.7 34.2 33.5 35.3 14.2 13.2 15.4
01-2006 16.1 15.2 17.3 33.6 32.7 34.7 13.7 12.7 15
02-2006 15.7 14.7 16.9 32.9 32 34 13.3 12.3 14.6
03-2006 15.3 14.3 16.5 32.3 31.6 33.2 13 11.9 14.2
04-2006 14.9 13.9 16.1 31.4 30.8 32.1 12.6 11.5 13.9
05-2006 14.4 13.4 15.7 30.5 29.7 31.4 12.2 11.1 13.5
06-2006 14 13.1 15.2 29.7 28.7 31 11.9 10.9 13.1
07-2006 13.7 12.9 14.7 28.9 27.8 30.4 11.6 10.8 12.7
08-2006 13.4 12.7 14.4 28.5 27 30.5 11.4 10.7 12.2
09-2006 13.1 12.3 14.1 28.1 26.1 30.8 11.1 10.4 11.9
10-2006 12.8 11.9 13.8 27.9 25.4 31.1 10.7 10 11.5
11-2006 12.3 11.4 13.5 27.2 24.4 30.8 10.3 9.7 11.2
12-2006 11.9 10.9 13 26.4 23.7 29.8 9.9 9.2 10.8
01-2007 11.3 10.4 12.4 25.3 23.1 28.1 9.4 8.6 10.4
02-2007 10.8 9.9 11.9 24.5 22.7 26.7 9 8.2 10.1
03-2007 10.3 9.5 11.4 23.5 22 25.4 8.6 7.8 9.7
04-2007 10 9.3 10.9 22.6 21.5 24.1 8.4 7.6 9.3
05-2007 9.8 9.1 10.6 22 20.8 23.5 8.2 7.6 9
06-2007 9.6 9 10.3 21.6 20 23.6 8.1 7.6 8.7
07-2007 9.5 9 10.1 21.6 19.5 24.1 8 7.7 8.4
08-2007 9.4 9 9.9 21.1 18.9 23.9 7.9 7.7 8.2
09-2007 9.2 8.8 9.6 20.4 18.3 23 7.8 7.6 8
10-2007 8.9 8.5 9.3 19.4 17.7 21.4 7.6 7.3 7.9
11-2007 8.5 8.2 9 18.7 17.4 20.5 7.3 7 7.6
12-2007 8.2 7.7 8.8 18.3 16.9 20.1 6.9 6.6 7.4
01-2008 7.8 7.1 8.6 18.3 16.5 20.6 6.5 5.9 7.1
02-2008 7.4 6.6 8.4 17.9 15.9 20.5 6.1 5.5 6.9
03-2008 7.2 6.4 8.2 17.6 15.5 20.3 5.9 5.3 6.7
04-2008 7.2 6.5 8.1 17.7 15.5 20.4 6 5.4 6.6
05-2008 7.2 6.5 8 17.5 15.3 20.3 6 5.5 6.6
06-2008 7.1 6.4 7.9 17 14.9 19.7 5.9 5.4 6.5
07-2008 6.9 6.2 7.8 16.4 14.4 18.9 5.8 5.2 6.5
08-2008 6.9 6.2 7.7 16.2 14.4 18.6 5.8 5.2 6.5
09-2008 6.8 6.1 7.7 16.3 14.5 18.7 5.7 5.1 6.4
10-2008 6.9 6.2 7.7 16.8 14.8 19.4 5.7 5.1 6.3
11-2008 6.9 6.3 7.8 17.3 15.3 19.8 5.7 5.2 6.4
12-2008 7 6.3 7.8 17.5 15.7 19.8 5.8 5.2 6.5
01-2009 7.2 6.6 8 17.8 16.5 19.5 6 5.4 6.7
02-2009 7.4 6.9 8.1 18.2 17.3 19.4 6.1 5.6 6.8
03-2009 7.6 7.1 8.2 18.6 18 19.5 6.3 5.8 7
04-2009 7.7 7.3 8.3 19 18.2 19.9 6.4 5.9 7
05-2009 7.9 7.4 8.4 19.5 18.8 20.5 6.5 6.1 7.1
06-2009 8.1 7.7 8.5 20.4 19.9 21.2 6.6 6.3 7.1
07-2009 8.3 8 8.7 21.6 21.1 22.3 6.8 6.5 7.2
08-2009 8.5 8.2 8.8 22.2 21.9 22.6 6.9 6.6 7.3
09-2009 8.6 8.3 8.9 22.5 22.5 22.6 7 6.6 7.4
10-2009 8.6 8.4 8.9 22.5 22.8 21.9 7 6.6 7.5
11-2009 8.7 8.5 9 22.5 23 21.8 7.2 6.7 7.6
12-2009 9 8.8 9.2 22.6 22.8 22.3 7.4 7 7.8
01-2010 9.5 9.4 9.7 23.1 22.8 23.5 7.9 7.7 8.2
02-2010 9.8 9.7 9.9 23.4 22.6 24.4 8.2 8.1 8.3
03-2010 9.9 9.8 10 23.5 22.4 25.1 8.3 8.2 8.3
04-2010 9.6 9.4 9.9 23.5 22 25.5 8 7.9 8.3
05-2010 9.6 9.3 10 23.9 22.1 26.3 8 7.7 8.2
06-2010 9.6 9.3 10 24.1 22.5 26.2 7.9 7.7 8.3
07-2010 9.6 9.3 9.9 23.9 22.7 25.6 7.9 7.6 8.3
08-2010 9.6 9.3 10 23.9 22.8 25.4 7.9 7.6 8.3
09-2010 9.6 9.3 10 24 22.7 25.7 8 7.7 8.4
10-2010 9.6 9.3 10 23.7 22.1 25.8 8 7.7 8.4
11-2010 9.5 9.2 10 23.5 21.8 25.9 8 7.7 8.4
12-2010 9.5 9.2 10 24 22.4 26.5 8 7.7 8.4
01-2011 9.5 9.1 9.9 24.7 23.2 26.9 7.9 7.5 8.3
02-2011 9.4 9 9.9 25.2 23.8 27.3 7.8 7.4 8.3
03-2011 9.4 9 10 25.7 24.3 27.7 7.8 7.3 8.3
04-2011 9.5 9 10.1 25.5 24.2 27.4 7.8 7.3 8.5
05-2011 9.6 9 10.2 25.4 23.9 27.7 7.9 7.3 8.6
06-2011 9.6 8.9 10.4 25.4 23.4 28.3 7.9 7.3 8.6
07-2011 9.6 8.9 10.5 25.6 23 29.5 7.9 7.3 8.7
08-2011 9.7 8.9 10.7 25.8 22.8 30.2 8 7.3 8.8
09-2011 9.8 9 10.7 26.1 23 30.5 8.1 7.4 8.9
10-2011 9.9 9.1 10.8 26.4 23.7 30.4 8.2 7.5 9
11-2011 9.9 9.2 10.8 26.6 24 30.2 8.2 7.6 9
12-2011 9.9 9.2 10.8 26.4 24.1 29.7 8.2 7.6 9
01-2012 9.9 9.2 10.7 26.2 23.8 29.4 8.3 7.6 9
02-2012 9.9 9.2 10.8 26.1 23.8 29.5 8.3 7.7 9
03-2012 9.9 9.2 10.8 26.2 23.7 29.6 8.3 7.6 9.1
04-2012 9.9 9.2 10.9 26.2 23.6 29.9 8.3 7.6 9.1
05-2012 10 9.3 10.9 26.3 23.7 30 8.4 7.7 9.2
06-2012 10.1 9.4 10.9 26.2 23.8 29.7 8.5 7.9 9.3
07-2012 10.2 9.5 10.9 26.1 23.9 29.3 8.6 8 9.3
08-2012 10.3 9.7 11 26.4 24.2 29.5 8.7 8.1 9.4
09-2012 10.3 9.7 11.1 26.6 24.4 29.7 8.7 8.1 9.4
10-2012 10.3 9.6 11.2 27 24.5 30.6 8.7 8.1 9.4
11-2012 10.4 9.6 11.3 27.3 24.7 31.2 8.7 8 9.5
12-2012 10.4 9.7 11.3 27.5 24.8 31.5 8.7 8.1 9.5
01-2013 10.5 9.8 11.4 27.7 24.9 31.6 8.9 8.2 9.7
02-2013 10.6 9.8 11.4 27.6 24.9 31.6 8.9 8.3 9.7
03-2013 10.6 9.9 11.4 27.5 24.9 31.3 9 8.3 9.8
04-2013 10.6 9.9 11.4 27.4 24.9 31.1 9 8.4 9.7
05-2013 10.5 9.9 11.3 27.2 25 30.5 9 8.3 9.7
06-2013 10.5 9.8 11.2 27.2 25.3 30 8.9 8.2 9.6
07-2013 10.4 9.7 11.1 27.2 25.6 29.5 8.8 8.1 9.6
08-2013 10.3 9.7 11 27.2 25.8 29.1 8.7 8 9.5
09-2013 10.2 9.6 10.9 27.3 26 29.2 8.6 7.9 9.4
10-2013 10.1 9.5 10.8 27.3 26 29.3 8.5 7.8 9.3
11-2013 10 9.4 10.8 27.2 25.8 29.3 8.4 7.8 9.2
12-2013 10 9.4 10.6 26.9 25.5 28.9 8.4 7.8 9.1
01-2014 9.9 9.4 10.5 26.3 24.9 28.3 8.4 7.9 9
02-2014 9.8 9.4 10.4 25.7 24.3 27.6 8.3 7.9 8.9
03-2014 9.6 9.2 10.2 25.1 23.8 26.9 8.2 7.7 8.8
04-2014 9.4 8.9 10 24.6 23.4 26.4 8 7.5 8.6
05-2014 9.2 8.7 9.8 24.2 23 25.9 7.8 7.3 8.5
06-2014 9 8.5 9.6 24 22.8 25.6 7.6 7.1 8.3
07-2014 8.8 8.3 9.5 23.9 22.7 25.6 7.4 6.8 8.1
08-2014 8.6 8.1 9.3 23.6 22.4 25.3 7.3 6.7 8
09-2014 8.5 8 9.2 23.1 22 24.7 7.2 6.7 7.9
10-2014 8.4 8 9 22.4 21.4 23.8 7.2 6.7 7.8
11-2014 8.3 7.9 8.9 21.8 20.9 23.2 7.1 6.7 7.7
12-2014 8.2 7.7 8.7 21.3 20.4 22.6 7 6.5 7.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment