Summary
This file was created by Markus Säynevirta . If you use files created by me, an email (account needed) or a message would be greatly appreciated. Please note the license terms. Other licensing terms can get discussed, too.
Licensing
Public domain Public domain false false
This work has been released into the public domain by its author, Markus Säynevirta . This applies worldwide.In some countries this may not be legally possible; if so: Markus Säynevirta grants anyone the right to use this work for any purpose , without any conditions, unless such conditions are required by law.
R code
> h <- read.csv ( "data.csv" , fileEncoding = "UTF-8-BOM" )
> W1 <- ggplot ( h , aes ( x = Year , y = val , group = Party , fill = Party ))
> W2 <- W1 + geom_area ( position = "fill" , colour = "black" , size = . 4 , alpha = . 8 )
> W3 <- W2 + scale_fill_manual ( values = c ( "#006288" , "#61BF1A" , "#FFDD93" , "#031F73" , "#E11931" , "#01954B" , "#fbfbfb" ), name = "Puolue" , breaks = c ( "1KOK" , "2VIHR" , "3RKP" , "4PERUS" , "5SDP" , "6KESK" , "7MUU" ), labels = c ( "Kok." , "Vihr." , "RKP" , "PS" , "SDP" , "Kesk." , "Muut" ))
> W4 <- W3 + scale_x_discrete ( limits = c ( 2007 , 2009 , 2011 , 2013 , 2015 , 2017 , 2019 ))
> W5 <- W4 + ylab ( "Osuus" ) + xlab ( "Vuosi" ) + ggtitle ( "Puolueiden kannatus 2007–2019" ) + theme ( plot.title = element_text ( hjust = 0.5 , face = "bold" ))
> ggsave ( "niittykumpu.svg" , plot = W5 , height = 3.23 , width = 6 )
Data
Year,val,Party
2007,51.1,1KOK
2007,14.6,2VIHR
2007,7.4,3RKP
2007,3.2,4PERUS
2007,10.5,5SDP
2007,7.1,6KESK
2007,6.1,7MUU
2008,46.9,1KOK
2008,18.2,2VIHR
2008,9.0,3RKP
2008,7.3,4PERUS
2008,8.6,5SDP
2008,3.9,6KESK
2008,6.1,7MUU
2009,45.0,1KOK
2009,22.5,2VIHR
2009,8.3,3RKP
2009,6.5,4PERUS
2009,8.3,5SDP
2009,4.8,6KESK
2009,4.6,7MUU
2011,49.9,1KOK
2011,13.9,2VIHR
2011,6.1,3RKP
2011,9.1,4PERUS
2011,11.9,5SDP
2011,3.8,6KESK
2011,5.3,7MUU
2012,44.0,1KOK
2012,21.3,2VIHR
2012,9.1,3RKP
2012,8.9,4PERUS
2012,9.2,5SDP
2012,3.1,6KESK
2012,4.4,7MUU
2014,46.8,1KOK
2014,15.5,2VIHR
2014,8.7,3RKP
2014,6.3,4PERUS
2014,7.6,5SDP
2014,7.0,6KESK
2014,8.1,7MUU
2015,43.1,1KOK
2015,16.3,2VIHR
2015,9.4,3RKP
2015,9.2,4PERUS
2015,8.1,5SDP
2015,7.4,6KESK
2015,6.5,7MUU
2017,39.7,1KOK
2017,28.1,2VIHR
2017,7.0,3RKP
2017,6.7,4PERUS
2017,6.9,5SDP
2017,3.4,6KESK
2017,8.2,7MUU
2019,38.3,1KOK
2019,22.6,2VIHR
2019,7.2,3RKP
2019,8.1,4PERUS
2019,8.4,5SDP
2019,3.1,6KESK
2019,12.3,7MUU
English Add a one-line explanation of what this file represents