Create a gist now

Instantly share code, notes, and snippets.

@klpn /meni.jl
Last active Apr 28, 2017

What would you like to do?
Create chart showing sum of hospitalized cases with meningococcal disease (ICD-10 A39 as main diagnosis) in Sweden over years, using data from The National Board of Health and Welfare
using DataFrames, PyPlot
m = readtable("meni9815.csv")
magg = aggregate(m, :Ålder, sum)
bar(magg[:Ålder], magg[:Kvinnor_sum], -2, align="edge", label = "Kvinnor")
bar(magg[:Ålder], magg[:Män_sum], 2, align="edge", label = "Män")
grid(1)
legend()
xlabel("Ålder")
ylabel("Antal (summa för ålder över år)")
title("Sjukhusvårdade meningokockinfektion Sverige 1998\u20132015")
År Ålder Män Kvinnor
2015 0 2 3
2015 5 0 0
2015 10 1 0
2015 15 2 3
2015 20 1 0
2015 25 1 0
2015 30 0 0
2015 35 0 1
2015 40 1 0
2015 45 1 1
2015 50 0 0
2015 55 1 1
2015 60 1 3
2015 65 1 2
2015 70 4 2
2015 75 0 0
2015 80 0 1
2015 85 0 2
2014 0 2 3
2014 5 0 1
2014 10 1 0
2014 15 2 1
2014 20 3 1
2014 25 1 1
2014 30 0 0
2014 35 0 0
2014 40 0 1
2014 45 1 0
2014 50 2 0
2014 55 1 0
2014 60 1 1
2014 65 1 1
2014 70 2 2
2014 75 3 0
2014 80 1 2
2014 85 1 1
2013 0 3 4
2013 5 0 3
2013 10 0 1
2013 15 7 3
2013 20 2 2
2013 25 1 1
2013 30 0 0
2013 35 1 0
2013 40 2 3
2013 45 0 1
2013 50 2 0
2013 55 0 2
2013 60 3 4
2013 65 1 3
2013 70 0 5
2013 75 3 3
2013 80 2 3
2013 85 2 3
2012 0 4 5
2012 5 2 0
2012 10 2 1
2012 15 6 2
2012 20 6 1
2012 25 0 3
2012 30 0 1
2012 35 1 2
2012 40 2 2
2012 45 2 1
2012 50 2 1
2012 55 5 5
2012 60 5 3
2012 65 2 2
2012 70 1 3
2012 75 1 3
2012 80 1 0
2012 85 2 5
2011 0 4 6
2011 5 1 3
2011 10 3 1
2011 15 8 3
2011 20 1 2
2011 25 0 1
2011 30 1 0
2011 35 1 0
2011 40 1 1
2011 45 0 1
2011 50 1 1
2011 55 1 1
2011 60 0 2
2011 65 3 0
2011 70 1 3
2011 75 1 2
2011 80 0 0
2011 85 0 5
2010 0 1 5
2010 5 0 0
2010 10 0 0
2010 15 7 7
2010 20 2 4
2010 25 1 1
2010 30 2 0
2010 35 0 0
2010 40 0 1
2010 45 3 2
2010 50 1 0
2010 55 0 2
2010 60 0 3
2010 65 1 4
2010 70 1 3
2010 75 1 2
2010 80 1 2
2010 85 0 1
2009 0 5 2
2009 5 0 0
2009 10 3 1
2009 15 6 7
2009 20 2 2
2009 25 2 1
2009 30 0 0
2009 35 0 0
2009 40 0 3
2009 45 1 1
2009 50 0 1
2009 55 0 1
2009 60 1 2
2009 65 1 1
2009 70 2 1
2009 75 0 3
2009 80 0 3
2009 85 2 2
2008 0 2 1
2008 5 2 0
2008 10 0 1
2008 15 4 6
2008 20 2 2
2008 25 1 1
2008 30 1 0
2008 35 0 1
2008 40 1 0
2008 45 2 0
2008 50 0 2
2008 55 0 1
2008 60 0 1
2008 65 2 0
2008 70 0 1
2008 75 2 2
2008 80 0 0
2008 85 2 2
2007 0 6 4
2007 5 0 1
2007 10 3 3
2007 15 1 8
2007 20 3 0
2007 25 2 0
2007 30 2 0
2007 35 1 1
2007 40 0 0
2007 45 0 0
2007 50 0 1
2007 55 1 0
2007 60 1 2
2007 65 2 1
2007 70 0 1
2007 75 1 0
2007 80 0 1
2007 85 3 2
2006 0 6 3
2006 5 4 0
2006 10 2 2
2006 15 5 4
2006 20 2 0
2006 25 2 3
2006 30 1 1
2006 35 1 0
2006 40 1 1
2006 45 0 0
2006 50 2 0
2006 55 0 2
2006 60 1 2
2006 65 1 1
2006 70 0 2
2006 75 0 2
2006 80 1 0
2006 85 1 2
2005 0 4 4
2005 5 1 1
2005 10 1 3
2005 15 1 6
2005 20 3 2
2005 25 2 1
2005 30 0 0
2005 35 1 0
2005 40 1 0
2005 45 2 3
2005 50 2 0
2005 55 1 5
2005 60 1 0
2005 65 1 0
2005 70 1 1
2005 75 1 2
2005 80 0 4
2005 85 0 1
2004 0 5 6
2004 5 2 1
2004 10 2 1
2004 15 8 8
2004 20 2 6
2004 25 3 0
2004 30 2 0
2004 35 0 1
2004 40 1 0
2004 45 0 0
2004 50 1 0
2004 55 0 1
2004 60 0 2
2004 65 1 0
2004 70 0 0
2004 75 0 1
2004 80 0 0
2004 85 0 2
2003 0 6 4
2003 5 2 2
2003 10 3 3
2003 15 2 8
2003 20 1 2
2003 25 2 1
2003 30 1 0
2003 35 0 3
2003 40 1 0
2003 45 0 1
2003 50 1 0
2003 55 3 1
2003 60 1 0
2003 65 2 0
2003 70 0 0
2003 75 0 2
2003 80 0 1
2003 85 0 1
2002 0 5 0
2002 5 2 2
2002 10 6 0
2002 15 3 4
2002 20 1 2
2002 25 1 1
2002 30 0 0
2002 35 1 0
2002 40 0 1
2002 45 1 0
2002 50 0 1
2002 55 2 3
2002 60 0 0
2002 65 1 0
2002 70 1 3
2002 75 0 0
2002 80 0 2
2002 85 2 3
2001 0 7 9
2001 5 1 0
2001 10 1 2
2001 15 5 12
2001 20 3 4
2001 25 2 0
2001 30 0 0
2001 35 1 1
2001 40 1 0
2001 45 0 1
2001 50 2 1
2001 55 1 1
2001 60 2 0
2001 65 1 0
2001 70 2 1
2001 75 0 3
2001 80 0 2
2001 85 1 0
2000 0 7 3
2000 5 0 1
2000 10 1 0
2000 15 6 7
2000 20 5 7
2000 25 0 2
2000 30 1 1
2000 35 2 0
2000 40 1 0
2000 45 2 1
2000 50 0 0
2000 55 2 1
2000 60 4 2
2000 65 0 0
2000 70 0 0
2000 75 0 1
2000 80 0 2
2000 85 1 1
1999 0 7 3
1999 5 2 0
1999 10 4 1
1999 15 3 4
1999 20 4 5
1999 25 1 1
1999 30 0 0
1999 35 0 1
1999 40 0 1
1999 45 2 0
1999 50 0 0
1999 55 0 2
1999 60 0 2
1999 65 0 1
1999 70 1 0
1999 75 0 2
1999 80 0 2
1999 85 0 1
1998 0 4 6
1998 5 3 1
1998 10 2 2
1998 15 5 6
1998 20 6 5
1998 25 2 3
1998 30 0 2
1998 35 0 0
1998 40 1 2
1998 45 2 0
1998 50 0 2
1998 55 2 0
1998 60 1 1
1998 65 0 1
1998 70 0 1
1998 75 0 1
1998 80 1 2
1998 85 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment