You can reshape the data using the reshape() function. I have not used that function in many years, so the following may not be the best way to get the desired result. You should be able to use DF2 in ggplot() as in my previous example.
DF <- structure(list(Alue = c("Helsinki", "Askola", "Espoo", "Hanko",
"Vantaa", "Hyvinkaa"),
SDP = c(13.5, 18.5, 13, 28.7, 21.4, 21.8),
PS = c(12.3, 23.7, 11.6, 11.4, 18.3, 24),
KOK = c(21.8, 11.5,31, 6.1, 18.8, 17),
KESK = c(2.9, 23.5, 4, 1.9, 5, 7.4),
VIHR = c(23.5,6.4, 18, 5.5, 14.5, 11.2),
VAS = c(11.1, 4.2, 3.5, 7.9, 5.9,5.5),
RKP = c(5.3, 2.4, 7.7, 30.1, 2.8, 1),
KD = c(1.9, 2.4,2.7, 2.2, 3, 3.3),
SIN = c(0.5, 1.6, 1.7, 0.9, 1.9, 1.7),
PIR = c(1.5,0.5, 1, 0.6, 1, 0.7),
STL = c(0.3, 0.5, 0.4, 0.7, 0.6, 0.5),
KP = c(0, 0.1, 0, 0.2, 0.1, 0),
FP = c(0.9, 0, 0.2, 0.1,0.2, 0.2),
LIB = c(0.3, 0.2, 0.5, 0.2, 0.3, 0.2),
SKP = c(0.2,0.3, 0.2, 0.5, 0.3, 0.3),
EOP = c(0.2, 0.2, 0.2, 0.2, 0.2,0.2),
IP = c(0.1, 0.2, 0.1, 0.1, 0.2, 0.1),
SKE = c(0.1,0.1, 0.1, 0.1, 0.2, 0.1),
KTP = c(0, 0, 0, 0.1, 0, 0),
Muut = c(3.5,3.7, 4.1, 2.5, 5.4, 4.7),
Vaalipiiri = c("Helsinki", "Uusimaa","Uusimaa", "Uusimaa", "Uusimaa", "Uusimaa")),
row.names = c(NA,6L), class = "data.frame")
DF2 <- reshape(data = DF, idvar = c("Alue", "Vaalipiiri"), varying = list(2:21),
timevar = "Party", direction = "long", times = colnames(DF)[2:21],
v.names = "Value")
head(DF2, 10)
#> Alue Vaalipiiri Party Value
#> Helsinki.Helsinki.SDP Helsinki Helsinki SDP 13.5
#> Askola.Uusimaa.SDP Askola Uusimaa SDP 18.5
#> Espoo.Uusimaa.SDP Espoo Uusimaa SDP 13.0
#> Hanko.Uusimaa.SDP Hanko Uusimaa SDP 28.7
#> Vantaa.Uusimaa.SDP Vantaa Uusimaa SDP 21.4
#> Hyvinkaa.Uusimaa.SDP Hyvinkaa Uusimaa SDP 21.8
#> Helsinki.Helsinki.PS Helsinki Helsinki PS 12.3
#> Askola.Uusimaa.PS Askola Uusimaa PS 23.7
#> Espoo.Uusimaa.PS Espoo Uusimaa PS 11.6
#> Hanko.Uusimaa.PS Hanko Uusimaa PS 11.4
Created on 2020-06-23 by the reprex package (v0.3.0)