Skill-Building Exercise 2: Presenting Patterns Task 1: Abortion Attitudes in American Society A) Data Preparation (Preparing and cleaning the data while creating the new catagories for abortion, politcal views, education and gender)

library(gt)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggridges)
library(fst)
library(scales)
## 
## Attaching package: 'scales'
## 
## The following object is masked from 'package:purrr':
## 
##     discard
## 
## The following object is masked from 'package:readr':
## 
##     col_factor
gss <- read_fst ("gss2022.fst")
gss_cleaned <- gss %>%
  mutate(
    abortion_support = case_when(
      abany == "yes" ~ "Support",
      abany == "no" ~ "Oppose",
      TRUE ~ NA_character_
      ),
    abortion_support = factor(abortion_support,levels = c("Support", "Oppose"))
  ) %>%
filter(!is.na(abortion_support))
table(gss_cleaned$abortion_support)
## 
## Support  Oppose 
##   16626   22628
gss_cleaned <- gss_cleaned %>%
  mutate(
    polviews_triad = case_when(
      polviews %in% c("liberal", "extremely liberal", "slightly liberal") ~ "Liberal",
      polviews == "moderate, middle of the road" ~ "Moderate",
      polviews %in% c("slightly conservative", "conservative", "extremely conservative") ~ "Conservative",
      TRUE ~ NA_character_
    ),
    polviews_triad = factor(polviews_triad,levels = c("Liberal", "Moderate", "Conservative"))
) %>%
filter(!is.na(polviews_triad))
table(gss_cleaned$polviews_triad)
## 
##      Liberal     Moderate Conservative 
##        10395        14040        12450
gss_cleaned <- gss_cleaned %>%
  mutate(
    education_level = case_when(
      degree %in% c("less than high school", "high school") ~ "High School or Less",
      degree == "associate/junior college" ~ "Some College",
      degree %in% c("bachelor's", "graduate") ~ "Bachelor's or Higher",
      TRUE ~ NA_character_
    ),
    education_level = factor(education_level, levels = c("High School or Less", "Some College", "Bachelor's or Higher"))
  ) %>%
filter(!is.na(education_level)) 
table(gss_cleaned$education_level)
## 
##  High School or Less         Some College Bachelor's or Higher 
##                25568                 2292                 8959
gss_cleaned <- gss_cleaned %>%
  mutate(
    gender_binary = case_when(
      sex == "male" ~ "Male",
      sex == "female" ~ "Female",
      TRUE ~ NA_character_
    ),
    gender_binary = factor(gender_binary, levels = c("Male", "Female"))
  ) %>%
filter(!is.na(gender_binary))  
table(gss_cleaned$gender_binary)
## 
##   Male Female 
##  16440  20366
  1. Table Creation (Created a table comparing abortion support to each social characteristic)
table_polviews <- gss_cleaned %>%
  group_by(polviews_triad) %>%
  summarise(
    sample_size = n(),
    support_count = sum(abortion_support == "Support", na.rm = TRUE)
  ) %>%
  mutate(percentage_support = (support_count / sample_size) * 100)
table_polviews
## # A tibble: 3 × 4
##   polviews_triad sample_size support_count percentage_support
##   <fct>                <int>         <int>              <dbl>
## 1 Liberal              10375          6177               59.5
## 2 Moderate             14010          5868               41.9
## 3 Conservative         12421          3847               31.0
polviews_table <- table_polviews %>%
  gt() %>%
  tab_header(title = md("**Abortion Rights Support by Political Views**")) %>%
  fmt_number(
    columns = c(percentage_support),
    decimals = 1
  ) %>%
  cols_label(
    polviews_triad = "Political Views",
    sample_size = "Sample Size",
    support_count = "Number Supporting",
    percentage_support = "Percentage Supporting (%)"
  )

polviews_table
Abortion Rights Support by Political Views
Political Views Sample Size Number Supporting Percentage Supporting (%)
Liberal 10375 6177 59.5
Moderate 14010 5868 41.9
Conservative 12421 3847 31.0
table_education <- gss_cleaned %>%
  group_by(education_level) %>%
  summarise(
    sample_size = n(),
    support_count = sum(abortion_support == "Support", na.rm = TRUE)
  ) %>%
  mutate(percentage_support = (support_count / sample_size) * 100)

education_table <- table_education %>%
  gt() %>%
  tab_header(title = md("**Abortion Rights Support by Education Level**")) %>%
  fmt_number(
    columns = c(percentage_support),
    decimals = 1
  ) %>%
  cols_label(
    education_level = "Education Level",
    sample_size = "Sample Size",
    support_count = "Number Supporting",
    percentage_support = "Percentage Supporting (%)"
  )

education_table
Abortion Rights Support by Education Level
Education Level Sample Size Number Supporting Percentage Supporting (%)
High School or Less 25558 9635 37.7
Some College 2291 1048 45.7
Bachelor's or Higher 8957 5209 58.2
table_gender <- gss_cleaned %>%
  group_by(gender_binary) %>%
  summarise(
    sample_size = n(),
    support_count = sum(abortion_support == "Support", na.rm = TRUE)
  ) %>%
  mutate(percentage_support = (support_count / sample_size) * 100)

gender_table <- table_gender %>%
  gt() %>%
  tab_header(title = md("**Abortion Rights Support by Gender**")) %>%
  fmt_number(
    columns = c(percentage_support),
    decimals = 1
  ) %>%
  cols_label(
    gender_binary = "Gender",
    sample_size = "Sample Size",
    support_count = "Number Supporting",
    percentage_support = "Percentage Supporting (%)"
  )

gender_table
Abortion Rights Support by Gender
Gender Sample Size Number Supporting Percentage Supporting (%)
Male 16440 7215 43.9
Female 20366 8677 42.6
  1. Visualization (Creating three seperate tables to plot abortion opposition to each social characteristic)
plot_polviews <- gss_cleaned %>%
  group_by(year, polviews_triad) %>%
  summarise(
    total = n(),
    oppose_count = sum(abortion_support == "Oppose", na.rm = TRUE)
  ) %>%
  mutate(oppose_pct = (oppose_count / total) * 100) %>%
  ggplot(aes(x = year, y = oppose_pct, color = polviews_triad)) +
  geom_line(size = 1) +
  geom_point() +
  scale_y_continuous(labels = function(x) sprintf("%.1f%%", x)) +
  scale_color_brewer(palette = "Set1") +
  labs(
    title = "Opposition to Abortion Rights over Time by Political Views",
    x = "Year",
    y = "Percentage Opposing Abortion Rights",
    color = "Political Views"
  ) +
  theme_minimal() +
  theme(
    panel.grid.minor = element_blank(),
    text = element_text(size = 12)
  )
## `summarise()` has grouped output by 'year'. You can override using the
## `.groups` argument.
## 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.
plot_polviews

plot_education <- gss_cleaned %>%
  group_by(year, education_level) %>%
  summarise(
    total = n(),
    oppose_count = sum(abortion_support == "Oppose", na.rm = TRUE)
  ) %>%
  mutate(oppose_pct = (oppose_count / total) * 100) %>%
  ggplot(aes(x = year, y = oppose_pct, color = education_level)) +
  geom_line(size = 1) +
  geom_point() +
  scale_y_continuous(labels = function(x) sprintf("%.1f%%", x)) +
  scale_color_brewer(palette = "Set2") +
  labs(
    title = "Opposition to Abortion Rights over Time by Education Level",
    x = "Year",
    y = "Percentage Opposing Abortion Rights",
    color = "Education Level"
  ) +
  theme_minimal() +
  theme(
    panel.grid.minor = element_blank(),
    text = element_text(size = 12)
  )
## `summarise()` has grouped output by 'year'. You can override using the
## `.groups` argument.
plot_education

plot_gender <- gss_cleaned %>%
  group_by(year, gender_binary) %>%
  summarise(
    total = n(),
    oppose_count = sum(abortion_support == "Oppose", na.rm = TRUE)
  ) %>%
  mutate(oppose_pct = (oppose_count / total) * 100) %>%
  ggplot(aes(x = year, y = oppose_pct, color = gender_binary)) +
  geom_line(size = 1) +
  geom_point() +
  scale_y_continuous(labels = function(x) sprintf("%.1f%%", x)) +
  scale_color_brewer(palette = "Dark2") +
  labs(
    title = "Opposition to Abortion Rights over Time by Gender",
    x = "Year",
    y = "Percentage Opposing Abortion Rights",
    color = "Gender"
  ) +
  theme_minimal() +
  theme(
    panel.grid.minor = element_blank(),
    text = element_text(size = 12)
  )
## `summarise()` has grouped output by 'year'. You can override using the
## `.groups` argument.
plot_gender

D) I chose to examine each explanatory variable according to abortion support separately because I found it much easier to create clear visualizations and interpret the results in this section. Across all three explanatory variables—gender, education, and political views—opposition to abortion rights has declined over the past several decades, even with variations per grouping. For gender (sex), women actually showed higher opposition rates than men before the 1980’s, with roughly 70% of women and 60% of men opposing abortion in the late 1970s. By the mid-2010s, however, women’s opposition fell to around 30%, dipping below men’s rate of approximately 40%. This shift indicates that female opposition dropped more sharply over time.

Turning to education (degree), those with a “Bachelor’s or Higher” consistently exhibited the lowest opposition levels—around 40–50% in the 1970s, declining to around 30% by 2020. Individuals with “Some College” started near 60% opposition in the late 1970s, fluctuating around 50% over time, while those with “High School or Less” stayed near 70%, dropping to around 50% in the last decade. These patterns suggest a negative relationship between educational attainment and opposition to abortion.

Finally, “political views” (polviews) reveals the starkest contrast. “Conservatives” consistently registered the highest opposition (near 70% in early years, remaining around 60% by 2020), compared to “Liberals” who showed a sharp decline—from about 50% opposition in the 1970s to below 20% in most recent years. “Moderates” fell in between the two extremes, with opposition declining from around 60% to roughly 40%. Overall, the data indicates that while abortion opposition has generally decreased, it remains most prevalent among conservatives, individuals with less formal education, and, to a lesser extent, males. TASK 2: A) (Cleaning and preparing the varaibles with new catagories for each country)

france <- read_fst("france_data.fst")
Hungary <- read_fst("hungary_data.fst")
france_cleaned <- france %>%
 filter(!freehms %in% c(7, 8, 9)) %>%
  mutate(
    freehms_cat = case_when(
      freehms %in% c(1, 2) ~ "Support",
      freehms == 3 ~ "Neutral",     
      freehms %in% c(4, 5) ~ "Oppose",    
      TRUE ~ NA_character_
    ),
    freehms_cat = factor(freehms_cat, levels = c("Support", "Neutral", "Oppose"))
  ) %>%
  filter(!is.na(freehms_cat))
table(france_cleaned$freehms_cat)
## 
## Support Neutral  Oppose 
##   15748    1537    1600
hungary_cleaned <- Hungary %>%
  filter(!freehms %in% c(7, 8, 9)) %>%
  mutate(
    freehms_cat = case_when(
      freehms %in% c(1, 2) ~ "Support",   
      freehms == 3 ~ "Neutral",           
      freehms %in% c(4, 5) ~ "Oppose",    
      TRUE ~ NA_character_
    ),
    freehms_cat = factor(freehms_cat, levels = c("Support", "Neutral", "Oppose"))
  ) %>%
  filter(!is.na(freehms_cat))

table(hungary_cleaned$freehms_cat)
## 
## Support Neutral  Oppose 
##    6756    3806    4557
france_cleaned <- france_cleaned %>%
  mutate(
    education = case_when(
      eisced %in% c(1, 2) ~ "Lower Secondary or Less",
      eisced %in% c(3, 4) ~ "Upper Secondary",
      eisced %in% c(5, 6, 7) ~ "Tertiary",
      TRUE ~ NA_character_
    ),
    education = factor(education, levels = c("Lower Secondary or Less", "Upper Secondary", "Tertiary"))
  ) %>%
  filter(!is.na(education))

table(france_cleaned$education)
## 
## Lower Secondary or Less         Upper Secondary                Tertiary 
##                    4168                    6490                    4928
hungary_cleaned <- hungary_cleaned %>%
  mutate(
    education = case_when(
      eisced %in% c(1, 2) ~ "Lower Secondary or Less",
      eisced %in% c(3, 4) ~ "Upper Secondary",
      eisced %in% c(5, 6, 7) ~ "Tertiary",
      TRUE ~ NA_character_
    ),
    education = factor(education, levels = c("Lower Secondary or Less", "Upper Secondary", "Tertiary"))
  ) %>%
  filter(!is.na(education))

table(hungary_cleaned$education)
## 
## Lower Secondary or Less         Upper Secondary                Tertiary 
##                    3476                    8434                    3126
france_cleaned <- france_cleaned %>%
  mutate(
    residence = case_when(
      domicil == 1 ~ "Major city",  
      domicil %in% c(2, 3) ~ "Urban periphery",
      domicil %in% c(4, 5) ~ "Rural",
      TRUE ~ NA_character_
    ),
    residence = factor(residence, levels = c("Major city", "Urban periphery", "Rural"))
  ) %>%
  filter(!is.na(residence))

table(france_cleaned$residence)
## 
##      Major city Urban periphery           Rural 
##            2891            7044            5647
hungary_cleaned <- hungary_cleaned %>%
  mutate(
    residence = case_when(
      domicil == 1 ~ "Major city",        
      domicil %in% c(2, 3) ~ "Urban periphery",
      domicil %in% c(4, 5) ~ "Rural",
      TRUE ~ NA_character_
    ),
    residence = factor(residence, levels = c("Major city", "Urban periphery", "Rural"))
  ) %>%
  filter(!is.na(residence))

table(hungary_cleaned$residence)
## 
##      Major city Urban periphery           Rural 
##            3847            5889            5294
france_cleaned <- france_cleaned %>%
  mutate(country = "France") %>%          
  filter(!is.na(freehms_cat) &          
         !is.na(education) &            
         !is.na(residence))             
hungary_cleaned <- hungary_cleaned %>%
  mutate(country = "Hungary") %>%       
  filter(!is.na(freehms_cat) &            
         !is.na(education) &            
         !is.na(residence))      
  1. TABLE 1:(Creating four tables comparing LGBTQ support to each the social characteristics)
table_france_edu <- france_cleaned %>%
  group_by(education) %>%
  summarise(
    group_size = n(),
    percent_sample = round(100 * n() / nrow(france_cleaned), 1),
    percent_opposing = round(100 * sum(freehms_cat == "Oppose") / n(), 1)
  ) %>%
  ungroup()
table_france_edu <- table_france_edu %>%
  gt() %>%
  tab_header(
    title = "Opposition to LGBTQ+ Rights by Education Level in France"
  ) %>%
  cols_label(
    education = "Education Level",
    group_size = "Group Size",
    percent_sample = "Percentage of Sample (%)",
    percent_opposing = "Percentage Opposing LGBTQ+ Rights (%)"
  ) %>%
  tab_source_note(
    source_note = "Data from the European Social Survey (ESS)."
  )
table_france_edu
Opposition to LGBTQ+ Rights by Education Level in France
Education Level Group Size Percentage of Sample (%) Percentage Opposing LGBTQ+ Rights (%)
Lower Secondary or Less 4166 26.7 13.9
Upper Secondary 6489 41.6 6.6
Tertiary 4927 31.6 3.9
Data from the European Social Survey (ESS).

TABLE 2

table_hungary_edu <- hungary_cleaned %>%
  group_by(education) %>%
  summarise(
    group_size = n(),
    percent_sample = round(100 * n() / nrow(hungary_cleaned), 1),
    percent_opposing = round(100 * sum(freehms_cat == "Oppose") / n(), 1)
  ) %>%
  ungroup()
table_hungary_edu <- table_hungary_edu %>%
  gt() %>%
  tab_header(
    title = "Opposition to LGBTQ+ Rights by Education Level in Hungary"
  ) %>%
  cols_label(
    education = "Education Level",
    group_size = "Group Size",
    percent_sample = "Percentage of Sample (%)",
    percent_opposing = "Percentage Opposing LGBTQ+ Rights (%)"
  ) %>%
  tab_source_note(
    source_note = "Data from the European Social Survey (ESS)."
  )
table_hungary_edu
Opposition to LGBTQ+ Rights by Education Level in Hungary
Education Level Group Size Percentage of Sample (%) Percentage Opposing LGBTQ+ Rights (%)
Lower Secondary or Less 3476 23.1 38.7
Upper Secondary 8430 56.1 29.3
Tertiary 3124 20.8 22.8
Data from the European Social Survey (ESS).

TABLE 3

table_france_residence <- france_cleaned %>%
  group_by(residence) %>%
  summarise(
    group_size = n(),
    percent_sample = round(100 * n() / nrow(france_cleaned), 1),
    percent_opposing = round(100 * sum(freehms_cat == "Oppose") / n(), 1)
  ) %>%
  ungroup()
table_france_residence <- table_france_residence %>%
  gt() %>%
  tab_header(
    title = "Opposition to LGBTQ+ Rights by Place of Residence in France"
  ) %>%
  cols_label(
    residence = "Place of Residence",
    group_size = "Group Size",
    percent_sample = "Percentage of Sample (%)",
    percent_opposing = "Percentage Opposing LGBTQ+ Rights (%)"
  ) %>%
  tab_source_note(
    source_note = "Data from the European Social Survey (ESS)."
  )
table_france_residence
Opposition to LGBTQ+ Rights by Place of Residence in France
Place of Residence Group Size Percentage of Sample (%) Percentage Opposing LGBTQ+ Rights (%)
Major city 2891 18.6 8.5
Urban periphery 7044 45.2 7.8
Rural 5647 36.2 7.2
Data from the European Social Survey (ESS).

TABLE 4

table_hungary_residence <- hungary_cleaned %>%
  group_by(residence) %>%
  summarise(
    group_size = n(),
    percent_sample = round(100 * n() / nrow(hungary_cleaned), 1),
    percent_opposing = round(100 * sum(freehms_cat == "Oppose") / n(), 1)
  ) %>%
  ungroup()
table_hungary_residence <- table_hungary_residence %>%
  gt() %>%
  tab_header(
    title = "Opposition to LGBTQ+ Rights by Place of Residence in Hungary"
  ) %>%
  cols_label(
    residence = "Place of Residence",
    group_size = "Group Size",
    percent_sample = "Percentage of Sample (%)",
    percent_opposing = "Percentage Opposing LGBTQ+ Rights (%)"
  ) %>%
  tab_source_note(
    source_note = "Data from the European Social Survey (ESS)."
  )
table_hungary_residence
Opposition to LGBTQ+ Rights by Place of Residence in Hungary
Place of Residence Group Size Percentage of Sample (%) Percentage Opposing LGBTQ+ Rights (%)
Major city 3847 25.6 27.5
Urban periphery 5889 39.2 30.4
Rural 5294 35.2 31.7
Data from the European Social Survey (ESS).
  1. VISUALIZATION 1 (Visualing four plots of LGBTG rights opposition to each social characteristic)
data_france_edu <- france_cleaned %>%
  group_by(education) %>%
  summarise(
    group_size = n(),
    oppose_count = sum(freehms_cat == "Oppose"),
    percent_oppose = round((oppose_count / group_size) * 100, 1)
  ) %>%
  ungroup()
plot_france_edu <- ggplot(data_france_edu, aes(x = percent_oppose, y = education)) +
  geom_col(fill = "steelblue", width = 0.6) +
  geom_point(aes(x = percent_oppose, y = education), color = "black", size = 3) +
  geom_text(aes(label = paste0(percent_oppose, "%")), 
            hjust = -0.2, color = "black", size = 3.5) +
  scale_x_continuous(expand = expansion(mult = c(0, 0.05)),
                     limits = c(0, max(data_france_edu$percent_oppose) + 10)) +
  labs(title = "Opposition to LGBTQ+ Rights by Education Level in France",
       x = "Percentage Opposing LGBTQ+ Rights",
       y = "Education Level") +
  theme_minimal() +
  theme(panel.grid.major = element_line(color = "gray80"),
        panel.grid.minor = element_line(color = "gray90"),
        plot.title = element_text(face = "bold", size = 14),
        axis.title = element_text(face = "bold", size = 12))
plot_france_edu

VISUALIZATION 2

data_hungary_edu <- hungary_cleaned %>%
  group_by(education) %>%
  summarise(
    group_size = n(),
    oppose_count = sum(freehms_cat == "Oppose"),
    percent_oppose = round((oppose_count / group_size) * 100, 1)
  ) %>%
  ungroup()
plot_hungary_edu <- ggplot(data_hungary_edu, aes(x = percent_oppose, y = education)) +
  geom_col(fill = "steelblue", width = 0.6) +
  geom_point(aes(x = percent_oppose, y = education), color = "black", size = 3) +
  geom_text(aes(label = paste0(percent_oppose, "%")), 
            hjust = -0.2, color = "black", size = 3.5) +
  scale_x_continuous(expand = expansion(mult = c(0, 0.05)),
                     limits = c(0, max(data_hungary_edu$percent_oppose) + 10)) +
  labs(title = "Opposition to LGBTQ+ Rights by Education Level in Hungary",
       x = "Percentage Opposing LGBTQ+ Rights",
       y = "Education Level") +
  theme_minimal() +
  theme(panel.grid.major = element_line(color = "gray80"),
        panel.grid.minor = element_line(color = "gray90"),
        plot.title = element_text(face = "bold", size = 14),
        axis.title = element_text(face = "bold", size = 12))
plot_hungary_edu

VISUALIZATION 3

data_france_residence <- france_cleaned %>%
  group_by(residence) %>%
  summarise(
    group_size = n(),
    oppose_count = sum(freehms_cat == "Oppose"),
    percent_oppose = round((oppose_count / group_size) * 100, 1)
  ) %>%
  ungroup()
plot_france_residence <- ggplot(data_france_residence, aes(x = percent_oppose, y = residence)) +
  geom_col(fill = "steelblue", width = 0.6) +
  geom_point(aes(x = percent_oppose, y = residence), color = "black", size = 3) +
  geom_text(aes(label = paste0(percent_oppose, "%")), 
            hjust = -0.2, color = "black", size = 3.5) +
  scale_x_continuous(expand = expansion(mult = c(0, 0.05)),
                     limits = c(0, max(data_france_residence$percent_oppose) + 10)) +
  labs(title = "Opposition to LGBTQ+ Rights by Place of Residence in France",
       x = "Percentage Opposing LGBTQ+ Rights",
       y = "Place of Residence") +
  theme_minimal() +
  theme(panel.grid.major = element_line(color = "gray80"),
        panel.grid.minor = element_line(color = "gray90"),
        plot.title = element_text(face = "bold", size = 14),
        axis.title = element_text(face = "bold", size = 12))
plot_france_residence

VISUALIZATION 4

data_hungary_residence <- hungary_cleaned %>%
  group_by(residence) %>%
  summarise(
    group_size = n(),
    oppose_count = sum(freehms_cat == "Oppose"),
    percent_oppose = round((oppose_count / group_size) * 100, 1)
  ) %>%
  ungroup()
plot_hungary_residence <- ggplot(data_hungary_residence, aes(x = percent_oppose, y = residence)) +
  geom_col(fill = "steelblue", width = 0.6) +
  geom_point(aes(x = percent_oppose, y = residence), color = "black", size = 3) +
  geom_text(aes(label = paste0(percent_oppose, "%")), 
            hjust = -0.2, color = "black", size = 3.5) +
  scale_x_continuous(expand = expansion(mult = c(0, 0.05)),
                     limits = c(0, max(data_hungary_residence$percent_oppose) + 10)) +
  labs(title = "Opposition to LGBTQ+ Rights by Place of Residence in Hungary",
       x = "Percentage Opposing LGBTQ+ Rights",
       y = "Place of Residence") +
  theme_minimal() +
  theme(panel.grid.major = element_line(color = "gray80"),
        panel.grid.minor = element_line(color = "gray90"),
        plot.title = element_text(face = "bold", size = 14),
        axis.title = element_text(face = "bold", size = 12))
plot_hungary_residence

D)

For France, the data indicates relatively low overall opposition to LGBTQ+ rights, with differences by education and place of residence. Among those with “Lower Secondary or Less” education, who represent 26.7% of the sample, 13.9% oppose LGBTQ+ rights. This rate drops to 6.6% among individuals with “Upper Secondary” education (41.6% of the sample) and reaches its lowest level—3.9%—in the “Tertiary” educated group (31.6% of the sample). Residential patterns in France show: major city residents exhibit an 8.5% opposition rate, urban periphery dwellers 7.8%, and rural residents 7.2%. These figures suggest that in France, higher educational attainment is associated with more supportive attitudes, while place of residence has a comparatively lesser effect on opposition levels.

In Hungary, however, the data reveal higher opposition rates and more acute contrasts compared to France. Respondents with “Lower Secondary or Less” education (23.1% of the sample) show a 38.7% opposition rate, compared to 29.3% among “Upper Secondary” respondents (56.1% of the sample) and 22.8% among the“Tertiary” education group (20.8% of the sample). Geographic differences are also more pronounced than in France: major city residents register 27.5% opposition, urban periphery residents 30.4%, and rural residents 31.7%. Overall, Hungary exhibits elevated opposition across all groups. Both countries demonstrate a similar pattern for higher educational attainment correlating with reduced opposition to LGBTQ+ rights.