#' @export gbPtyCol
gbPtyCol <- function(x) {
party.colours <- c(ALB = "#005EB8",
Alba = "#005EB8",
Conservative = "#0087dc",
Conservatives = "#0087dc",
Tory = "#0087dc",
Brexit = "#12B6CF",
Reform = "#12B6CF",
`Reform UK` = "#12B6CF",
`Brexit Party` = "#12B6CF",
`BRX` = "#12B6CF",
Tories = "#0087dc",
`Conservative Party` = "#0087dc",
CON = "#0087dc",
`The Conservative Party` = "#0087dc",
Con = "#0087dc",
con = "#0087dc",
Labour = "#d50000",
lab = "#d50000",
Lab = "#d50000",
LAB = "#d50000",
`The Labour Party` = "#d50000",
`The Labour party` = "#d50000",
`Labour party` = "#d50000",
`Lib Dem` = "#FDBB30",
`LibDem` = "#FDBB30",
`LibDems` = "#FDBB30",
`Lib-Dems` = "#FDBB30",
DEM = "#FDBB30",
`LD` = "#FDBB30",
`Liberal Democrats` = "#FDBB30",
`Liberal Democrat` = "#FDBB30",
UKIP = "#B3009D",
`United Kingdom Independence Party` = "#B3009D",
`United Kingdom Independence Party (UKIP)` = "#B3009D",
Green = "#008066",
Grn = "#008066",
GRN = "#008066",
`Green Party` = "#008066",
SNP = "#FFF95D",
`The Scottish National Party` = "#FFF95D",
`The Scottish National Party (SNP)` = "#FFF95D",
`Scottish National Party (SNP)` = "#FFF95D",
Plaid = "#3F8428",
PC = "#3F8428",
`Plaid Cymru` = "#3F8428",
DK = "#a4a6a8",
`Don't Know` = "#a4a6a8",
Other = "#a4a6a8",
`An independent candidate` = "#a4a6a8",
Oth = "#a4a6a8")
return(party.colours[x])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.