1 Intro

1.1 Theoretical framework

The coronavirus pandemic has had a strong impact on many areas of people’s lives in different countries, including politics. The Czech case seemed interesting to me for several reasons. As noted by Klimovský et al. (2021), despite the fact that the Czech government had no experience in dealing with such situations, during the first wave they tried to take quick action and imposed restrictions, which made it possible to successfully cope with the spread of the virus. However, as it became clear later, the government did not have an accurate strategy and was criticized for chaotic decisions and poor communication. So, in the summer and autumn, restrictions were weakened and when signs of the second wave appeared, the government did not react immediately and tried to pretend that everything was under control, which led to a great deterioration of the situation and loss of trust of citizens.

Diving more into the political component, from the article by Havlík & Kluknavská (2022) we see that in recent years the populist ANO party has dominated in the Czech Republic, but it has turned people away from itself due to illiberal rhetoric, accusations of corruption by the head and weak policies to combat the pandemic. As a result, the party failed in the elections in 2021, and the parties opposed to populism, which created two coalitions, on the contrary, won the majority of seats in parliament. In the project, it will be interesting for me to look at the situation and problems described above using the available data.

1.2 Research question

I decided to go with the following research question for my project: How the covid pandemic affected the attitude of Czech citizens towards politics?

2 Preparing and cleaning the dataset

2.1 Libraries

I loaded all the necessary libraries.

library(foreign)
library(dplyr)
## 
## Присоединяю пакет: 'dplyr'
## Следующие объекты скрыты от 'package:stats':
## 
##     filter, lag
## Следующие объекты скрыты от 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
library(tidyr)
library(stringr)
library(RColorBrewer)
library(knitr)
library(viridisLite)

2.2 Setting work directory and downloading the dataset

I decided to choose Czechia as my subject of analysis because there is good beer there.

setwd("C:/Users/user/Downloads")
czechia<-read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame = T)
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 0, 2, 3, 4, 5, 7, 9, 10, 12, 15, 20, 25, 30, 35, 40,
## 45, 50, 55, 60, 65, 70, 75, 79, 80, 83, 85, 90, 94, 95, 100, 105, 107, 110,
## 115, 120, 125, 130, 133, 135, 140, 150, 160, 165, 170, 180, 185, 190, 195, 200,
## 205, 210, 240, 260, 270, 300, 360, 390, 420, 431, 435, 440, 445, 450, 460, 465,
## 480, 487, 495, 500, 505, 510, 520, 525, 526, 530, 535, 600, 645, 900, 960 added
## in variable: nwspol
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 3, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 70, 75,
## 80, 85, 90, 100, 105, 110, 115, 120, 130, 133, 135, 140, 150, 160, 165, 170,
## 180, 185, 190, 195, 200, 205, 210, 225, 230, 240, 246, 250, 255, 260, 270, 275,
## 280, 285, 300, 310, 315, 330, 345, 350, 360, 363, 365, 375, 390, 405, 420, 425,
## 450, 460, 480, 485, 500, 510, 520, 530, 540, 570, 600, 620, 630, 640, 650, 660,
## 720, 750, 780, 840, 900, 1200 added in variable: netustm
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1950, 1954, 1955, 1965, 1968, 1969, 1970, 1973, 1978,
## 1980, 1983, 1984, 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
## 1997, 1999, 2000, 2002, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2015,
## 2016, 2017, 2019 added in variable: livecnta
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1, 2, 3, 4, 5, 6, 7, 8, 9 added in variable: hhmmb
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1931, 1932, 1934, 1935, 1936, 1937, 1938, 1939, 1940,
## 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953,
## 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966,
## 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979,
## 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992,
## 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
## 2006 added in variable: yrbrn
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
## 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
## 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
## 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89,
## 90 added in variable: agea
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1931, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940,
## 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953,
## 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966,
## 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979,
## 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992,
## 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
## 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018,
## 2019, 2020 added in variable: yrbrn2
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1931, 1945, 1947, 1949, 1952, 1953, 1955, 1956, 1957,
## 1958, 1960, 1961, 1962, 1963, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972,
## 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
## 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
## 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
## 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 added in variable:
## yrbrn3
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1965, 1967, 1969, 1971, 1974, 1977, 1978, 1979, 1980,
## 1982, 1985, 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
## 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
## 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 added in variable:
## yrbrn4
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1968, 1975, 1986, 1987, 1993, 1995, 1999, 2000, 2001,
## 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015,
## 2016, 2017, 2018, 2019, 2020, 2021 added in variable: yrbrn5
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1993, 1996, 2000, 2009, 2011, 2013, 2014, 2015, 2017,
## 2019, 2021 added in variable: yrbrn6
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1997, 2000, 2015, 2021 added in variable: yrbrn7
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 2000, 2018 added in variable: yrbrn8
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 2018 added in variable: yrbrn9
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 27, 30 added in variable: eduyrs
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1977, 1980, 1987, 1989, 1990, 1991, 1992, 1993, 1994,
## 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
## 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020,
## 2021 added in variable: pdjobyr
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 0, 1, 2, 3, 4, 5, 6, 7, 11, 18, 20, 25, 30, 100 added
## in variable: emplno
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17,
## 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 30, 35, 40, 50, 60, 80, 90, 100, 120,
## 150, 160, 200, 207, 250 added in variable: njbspv
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 4, 6, 7, 8, 9, 10, 12, 15, 16, 18, 20, 21, 23, 24, 25,
## 28, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50,
## 55, 60, 70, 84, 90, 100, 128, 142, 145, 160, 168 added in variable: wkhct
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 2, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 20, 22, 23,
## 24, 25, 28, 30, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
## 49, 50, 51, 52, 53, 54, 55, 56, 58, 60, 62, 65, 70, 75, 80, 84, 90, 95, 100,
## 128, 142, 160, 168 added in variable: wkhtot
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Duplicated levels in factor isco08: Commissioned armed forces officers,
## Non-commissioned armed forces officers, Armed forces occupations, other ranks,
## Police inspectors and detectives, Other clerical support workers, Protective
## services workers, Assemblers, Agricultural, forestry and fishery labourers,
## Food preparation assistants
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Duplicated levels in factor isco08p: Commissioned armed forces officers,
## Non-commissioned armed forces officers, Armed forces occupations, other ranks,
## Police inspectors and detectives, Other clerical support workers, Protective
## services workers, Assemblers, Agricultural, forestry and fishery labourers,
## Food preparation assistants
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 2, 5, 8, 9, 10, 12, 20, 21, 24, 25, 30, 35, 36, 37, 38,
## 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 52, 53, 55, 60, 65, 69, 70, 80, 150,
## 160, 168 added in variable: wkhtotp
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Duplicated levels in factor region: Wien, Extra-Regio NUTS 1, Extra-Regio
## NUTS 2, Extra-Regio NUTS 3, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio
## NUTS 3, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Zürich,
## Ticino, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Κύπρος,
## Κύπρος, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Extra-Regio
## NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Berlin, Berlin, Brandenburg,
## Bremen, Hamburg, Hamburg, Mecklenburg-Vorpommern, Saarland, Leipzig,
## Sachsen-Anhalt, Schleswig-Holstein, Thüringen, Extra-Regio NUTS 1, Extra-Regio
## NUTS 2, Extra-Regio NUTS 3, Nordjylland, Extra-Regio NUTS 1, Extra-Regio NUTS
## 2, Extra-Regio NUTS 3, Eesti, Kesk-Eesti, Kirde-Eesti, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, Extra-Regio NUTS 1, Extra-Regio NUTS 2,
## Extra-Regio NUTS 3, Cantabria, La Rioja, Comunidad de Madrid, Canarias,
## Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Helsinki-Uusimaa,
## Varsinais-Suomi, Kanta-Häme, Päijät-Häme, Kymenlaakso, Etelä-Karjala,
## Etelä-Savo, Pohjois-Savo, Pohjois-Karjala, Kainuu, Keski-Pohjanmaa,
## Pohjois-Pohjanmaa, Lappi, Kainuu, Pohjois-Pohjanmaa, Åland, Åland, Extra-Regio
## NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Ile-de-France, Centre — Val de
## Loire, Bourgogne, Franche-Comté, Jura, Picardie, Alsace, Champagne-Ardenne,
## Lorraine, Pays de la Loire, Pays de la Loire, Bretagne, Bretagne, Aquitaine,
## Limousin, Poitou-Charentes, Languedoc-Roussillon, Midi-Pyrénées, Auvergne,
## Rhône-Alpes, Provence-Alpes-Côte d’Azur, Corse, Guadeloupe, Martinique ,
## Guyane, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Georgia,
## Extra-region, Extra-region, Bjelovarsko-bilogorska županija,
## Virovitičko-podravska županija, Požeško-slavonska županija, Brodsko-posavska
## županija, Osječko-baranjska županija, Vukovarsko-srijemska županija, Karlovačka
## županija, Sisačko-moslavačka županija, Grad Zagreb, Grad Zagreb, Međimurska
## županija, Varaždinska županija, Koprivničko-križevačka županija,
## Krapinsko-zagorska županija, Zagrebačka županija, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, Budapest, Budapest, Pest, Pest,
## Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Ireland, Border,
## West, Dublin, Mid-East, Midland, Extra-Regio NUTS 1, Extra-Regio NUTS 2,
## Extra-Regio NUTS 3, Ísland, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio
## NUTS 3, Valle d’Aosta/Vallée d’Aoste, Extra-Regio NUTS 1, Extra-Regio NUTS 2,
## Extra-Regio NUTS 3, Liechtenstein, Liechtenstein, Liechtenstein, Extra-Regio
## NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Vilniaus apskritis, Alytaus
## apskritis, Kauno apskritis, Utenos apskritis, Extra-Regio NUTS 1, Extra-Regio
## NUTS 2, Extra-Regio NUTS 3, Luxembourg, Luxembourg, Luxembourg, Extra-Regio
## NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Latvija, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, Црна Гора, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, Северна Македонија, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, Malta, Malta, Malta, Extra-Regio NUTS
## 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Flevoland, Utrecht, Extra-Regio NUTS
## 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Innlandet, Trøndelag, Extra-Regio
## NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Lubelskie, Podkarpackie,
## Podlaskie, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Algarve,
## Área Metropolitana de Lisboa, Região Autónoma dos Açores, Região Autónoma dos
## Açores, Região Autónoma da Madeira, Região Autónoma da Madeira, Extra-Regio
## NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Nord-Est, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, Extra-Regio NUTS 1, Extra-Regio NUTS 2,
## Extra-Regio NUTS 3, Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3,
## Pomurska, Podravska, Koroška, Savinjska, Zasavska, Jugovzhodna Slovenija,
## Osrednjeslovenska, Gorenjska, Goriška, Obalno-kraška, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, Bratislavský kraj, Extra-Regio NUTS 1,
## Extra-Regio NUTS 2, Extra-Regio NUTS 3, İstanbul, İstanbul, İzmir, Ankara,
## Extra-Regio NUTS 1, Extra-Regio NUTS 2, Extra-Regio NUTS 3, Lincolnshire,
## Cornwall and Isles of Scilly, Northern Ireland, Extra-Regio NUTS 1, Extra-Regio
## NUTS 2, Extra-Regio NUTS 3, Kosovo, Kosovo
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 0, 1, 2, 3, 4, 5, 6 added in variable: chldo12
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
## 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
## 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 65 added in
## variable: ageo12
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18,
## 20, 24, 25, 27, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 100, 105,
## 110, 115, 120, 130, 135, 146, 150, 160, 165, 170, 175, 180, 195, 200, 210, 220,
## 240, 270, 300, 320, 330, 360, 390, 420, 540, 750 added in variable: ttmino12
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
## 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
## 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
## added in variable: agepnt
## Warning in read.spss("ESS10-subset.sav", use.value.labels = T, to.data.frame =
## T): Undeclared level(s) 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 15, 18, 20, 22, 25,
## 28, 30, 35, 39, 40, 45, 46, 47, 49, 50, 55, 60, 65, 70, 75, 80, 90, 95, 100,
## 105, 110, 115, 120, 135, 140, 150, 160, 165, 180, 190, 210, 225, 240, 260, 270,
## 300, 310, 315, 360, 420, 450, 480, 510, 600, 630, 720, 780, 900, 1080, 1200,
## 1440, 1500, 1800, 2700, 3000 added in variable: ttminpnt

2.3 Selecting variables

I selected variables of my interest and put them in a subset.

cz <- czechia%>%
  select(prtvtecz, prtclecz, trstplt, gvhanc19, respc19)
#За кого голосовали (prtvtecz)
#Кого придерживаются (prtclecz)
#Доверие политикам (trstplt)
#Справляется ли говермент (gvhanc19)
#Ковид у респондента (respc19)

2.4 Cleaning the dataset

I deleted the missing variables (NA) from dataset and replaced some values for a more convenient analysis. For the trstplt and gvhanc19 variables I changed some of the values so the whole scale would be a numeric one that goes from 0 to 10. For the prtvtecz/prtclecz and respc19 variables I only left two levels: “ANO 2011”/“Other” and “Yes”/“No” respectfully. These replacements are justified because: [prtvtecz/prtclecz] I am only interested in the dynamic of support for the ANO 2011 party; [respc19] It is possible to analyze the attitude of a person towards Covid-19 policies whether they really had Covid or think they have Covid, so it’s relevant to unite them. I also converted all the variables to appropriate types.

cz <- drop_na(cz)
cz$trstplt <- cz$trstplt %>% str_replace_all("No trust at all", "0")
cz$trstplt <- cz$trstplt %>% str_replace_all("Complete trust", "10")
cz$gvhanc19 <- cz$gvhanc19 %>% str_replace_all("Extremely dissatisfied", "0")
cz$gvhanc19 <- cz$gvhanc19 %>% str_replace_all("Extremely satisfied", "10")


cz$respc19 <- as.character(cz$respc19)

cz$respc19[cz$respc19 == "Yes, I tested positive for COVID-19"] <- "Yes"
cz$respc19[cz$respc19 == "Yes, I think I had COVID-19 but was not tested/did not test positive "] <- "Yes"
cz$respc19[cz$respc19 == "No, I have not had COVID-19"] <- "No"

cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("ODS", "Other")
cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("Svoboda a přímá demokracie", "Other")
cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("Česká pirátská strana", "Other")
cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("ČSSD", "Other")
cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("KSČM", "Other")
cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("KDU-ČSL", "Other")
cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("Starostové a nezávislí", "Other")
cz$prtvtecz <- cz$prtvtecz %>% str_replace_all("TOP 09", "Other")

cz$prtclecz <- cz$prtclecz %>% str_replace_all("ODS", "Other")
cz$prtclecz <- cz$prtclecz %>% str_replace_all("Svoboda a přímá demokracie", "Other")
cz$prtclecz <- cz$prtclecz %>% str_replace_all("Česká pirátská strana", "Other")
cz$prtclecz <- cz$prtclecz %>% str_replace_all("ČSSD", "Other")
cz$prtclecz <- cz$prtclecz %>% str_replace_all("KSČM", "Other")
cz$prtclecz <- cz$prtclecz %>% str_replace_all("KDU-ČSL", "Other")
cz$prtclecz <- cz$prtclecz %>% str_replace_all("Starostové a nezávislí", "Other")
cz$prtclecz <- cz$prtclecz %>% str_replace_all("TOP 09", "Other")

cz$trstplt <- as.numeric(cz$trstplt)
cz$gvhanc19 <- as.numeric(cz$gvhanc19)
cz$respc19 <- as.factor(cz$respc19)
cz$prtvtecz <- as.factor(cz$prtvtecz)
cz$prtclecz <- as.factor(cz$prtclecz)

3 Describing variables

3.1 Types & meanings

Label = c("prtvtecz", "prtclecz", "trstplt", "gvhanc19", "respc19") 
Meaning = c("Which political party did respondent vote for", "The views of which political party the respondent adheres to.", "Trust in politicians", "How well is the government doing to limit the spread of COVID-19 according to resdondents opinion", "Whether the respondent was ill with COVID-19")
Level_Of_Measurement <- c("Categorical Nominal", "Categorical Nominal", "Numeric Interval", "Numeric Interval", "Categorical Nominal")
df <- data.frame(Label, Meaning, Level_Of_Measurement, stringsAsFactors = FALSE)
head(df)
##      Label
## 1 prtvtecz
## 2 prtclecz
## 3  trstplt
## 4 gvhanc19
## 5  respc19
##                                                                                             Meaning
## 1                                                     Which political party did respondent vote for
## 2                                     The views of which political party the respondent adheres to.
## 3                                                                              Trust in politicians
## 4 How well is the government doing to limit the spread of COVID-19 according to resdondents opinion
## 5                                                      Whether the respondent was ill with COVID-19
##   Level_Of_Measurement
## 1  Categorical Nominal
## 2  Categorical Nominal
## 3     Numeric Interval
## 4     Numeric Interval
## 5  Categorical Nominal

3.2 Descriptive statistics table

mode <- function (x) {
  u <- unique(x)
  tab <- tabulate(match(x, u))
  u[tab == max(tab)]
}
t.trstplt <- c(mean(cz$trstplt), mode(cz$trstplt), median(cz$trstplt))
names(t.trstplt) <- c("mean", "mode", "median")
t.gvhanc19 <- c(mean(cz$gvhanc19), mode(cz$gvhanc19), median(cz$gvhanc19))
names(t.gvhanc19) <- c("mean", "mode", "median")
mode(cz$prtvtecz)
## [1] Other
## Levels: ANO 2011 Other
t.prtvtecz<-c("none", "Other", "none")
names(t.prtvtecz) <- c("mean", "mode", "median")
mode(cz$prtclecz)
## [1] Other
## Levels: ANO 2011 Other
t.prtclecz<-c("none", "Other", "none")
names(t.prtclecz) <- c("mean", "mode", "median")
mode(cz$respc19)
## [1] No
## Levels: No Yes
t.respc19<-c("none", "No", "none")
names(t.respc19) <- c("mean", "mode", "median")
desc_stat_table<-data.frame(t.trstplt, t.gvhanc19, t.prtvtecz, t.prtclecz, t.respc19)
head(desc_stat_table)
##        t.trstplt t.gvhanc19 t.prtvtecz t.prtclecz t.respc19
## mean    4.251248   5.600666       none       none      none
## mode    5.000000   5.000000      Other      Other        No
## median  4.000000   6.000000       none       none      none

3.3 Distribution of the variables

  1. prtvtecz: Which political party did respondent vote for
ggplot(cz) +
  geom_bar(aes(x=prtvtecz, fill=prtvtecz)) +
  xlab("Political party (vote)") + 
  ylab("Number of people") 

Conclusion for Political party (vote) barplot: There are more people who vote not for ANO 2011, but ANO 2011 voters is the largest group within all voters (in category Other we compare voters for all parties except ANO 2011)

  1. prtclecz: The views of which political party the respondent adheres to
ggplot(cz)+
  geom_bar(aes(x=prtclecz, fill=prtclecz))+
  xlab("Political party (views)") +
  ylab("Number of people") 

Conclusion for Political party (views) barplot: There are more people who have same views not as ANO 2011, but ANO 2011 viewers is the largest group within all viewers (in category Other we compare for all parties except ANO 2011). Also in comparison with voters there are less people who choose ANO 2011 views

3.respc19: Whether the respondent was ill with COVID-19

ggplot(cz)+
  geom_bar(aes(x=respc19, fill=respc19))+
  xlab("covid-19")+
  ylab("Number of people")

Conclusion for covid-19 barplot: there are more people who haven’t covid-19 disease

  1. trstplt: Trust in politicians
ggplot(cz)+ 
  geom_histogram(aes(x=trstplt), fill="#F6FFEB", color="#315800", binwidth = 1)+
  theme_minimal()+
  xlab("Trust in politicians")+
  ylab("Number of people")+
  geom_vline(aes(xintercept = mean(cz$trstplt), color = 'mean'), linetype="solid", size=1) +
  geom_vline(aes(xintercept = median(cz$trstplt), color = 'median'), linetype="solid", size=1)+
  geom_vline(aes(xintercept = mode(cz$trstplt), color = 'mode'), linetype="solid",size=1) 
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

Conclusion for trust in politicians barplot: Level of trust in politician is skewed to the right, so most of people tend to trust in politician in the middle of a scale, but there are some who have high level of trust

  1. gvhanc19: How well is the government doing to limit the spread of COVID-19 according to resdondents opinion
ggplot(cz)+
  geom_histogram(aes(x=gvhanc19), fill="#F6FFEB", color="#315800", binwidth = 1)+
  theme_minimal()+
  xlab("Satisfaction with governmental anti-coronavirus policies")+
  ylab("Number of people")+
  geom_vline(aes(xintercept = mean(cz$gvhanc19), color = 'mean'), linetype="solid", size=1) +
  geom_vline(aes(xintercept = median(cz$gvhanc19), color = 'median'), linetype="solid", size=1)+
  geom_vline(aes(xintercept = mode(cz$gvhanc19), color = 'mode'), linetype="solid",size=1) 

Conclusion for satisfaction with governmental anti-coronavirus policies: satisfaction with governmental anti-coronavirus is skewed to the left, so most of people tend to have satisfaction in the middle of a scale, but there are some who have low level of satisfaction

4 Creating graphs

4.1 Scatterplot

Is there a connection between the assessment of government actions in the field of COVID-19 and trust in politicians? I assume that the higher the respondent evaluates the actions of politicians to prevent the spread of covid19, the more they will trust politicians.

ggplot(cz)+
  geom_point(aes(x=gvhanc19, y=trstplt))+
  theme_minimal()+
  xlab("Assessment of government actions")+
  ylab("Trust in politicians")+
  ggtitle("The level of trust in politicians, depending on the assessment of government actions in the field of COVID-19")

Scatterplot conclusion: Correlation between variables is positive and weak. This means that there is a certain relationship between the level of trust in politicians and the assessment of their actions. The higher the score, the greater the trust.

4.2 Boxplot

Are there differences in satisfaction with the government’s actions in connection with covid-19 among those who were sick and those who were not sick with coronavirus? In order to understand whether the experience of Coronavirus disease has influenced satisfaction with the actions of the government (at the time of the ESS study, it was dominated by the ANO party). I assume that those who were ill and those who were not ill may have different opinions about the anti-coronavirus policy, because those who were ill, unlike those who were not ill, faced not only the experience of avoiding diagnosis, but also its treatment

ggplot(cz)+
  geom_boxplot(aes(y=gvhanc19, x=respc19, fill=respc19),alpha=0.5)+
   theme_minimal()+
  labs(y="satisfaction with the Government's actions \n in connection with covid-19",y=NULL,
       x="the respondent has covid-19", 
       title = "Comparing the level of satisfaction with government \n 
       actions due to whether the respondent had covid-19")+
  theme(legend.position="none",  plot.title = element_text(face = "bold",hjust = 0.5))

Boxplot conclusion: The graph shows that the response range of those who were ill and those who were not ill with covid-19 is approximately the same. At the same time, those who were not sick with coronavirus are more satisfied with the government’s anti-coronavirus policy

4.3 Stacked barplot

Does the fact of the respondent having contracted Covid-19 make them less likely to support ANO 2011?

Czech party ANO 2011 is a populist party that was widely supported from 2013 to 2020. However, during the Covid years, this party saw a decline in popularity, losing its seats. This is explained partly by the fact that the party’s Covid policies were very ineffective (Havlík & Kluknavská, 2022).

I decided to use variables prtclecz (which party the respodent feels closer to) and respc19 (has the respondent contracted Covid-19). I decided to only leave two levels for each of the variables to show the relationship more clearly. For the prtclecz variable I divided respondents in two groups: ones who supported ANO 2011 (“ANO 2011”), and ones who suppported a different party (“Other”). For respc19 variable I simplified it to people who had covid or think they had covid (“yes”) and people who didn’t have covid (“no”)

ggplot(cz)+
  geom_bar(aes(x=respc19, fill=prtclecz), position="fill")+
  theme_minimal()+
  labs(title = "Does the fact of the respondent having contracted Covid-19 make them less likely to support ANO 2011?",
       x = "has the respondent ever contracted Covid-19",
       y = NULL,
       fill = "party which the respondent feels closer to")+
  theme(plot.title = element_text(face = "bold", size=20, vjust=0.9))

Stacked barplot conclusion: Here in the graph it is evident that people who have not contracted Covid-19 vote for ANO 2011 less than people who have not contracted it. The difference is not that significant. Perhaps, this can be explained by the fact that the peak of ANO 2011’s decline in popularity is yet to happen in 2021, according to Havlík & Kluknavská (2022)

5 References

  1. Klimovský, D., Nemec, J., & Bouckaert, G. (2021). The COVID-19 pandemic in the Czech Republic and Slovakia. Scientific Papers of the University of Pardubice-Series D, Faculty of Economics and Administration, volume 29, issue: 1. 2.Havlík, V., & Kluknavská, A. (2022). The populist vs anti‐populist divide in the time of pandemic: The 2021 Czech national election and its consequences for European politics. JCMS: Journal of Common Market Studies, 60, 76-87.