corruptiondata <-data.frame(
Regions = rep(c("Urban","Rural"), each = 3),
Years = rep(c(2022, 2023, 2024), times = 2),
Index = c(3.96, 3.93, 3.86, 3.9, 3.9, 3.83)
)
library(ggplot2)
ggplot(corruptiondata, aes(x = as.factor(Years), y = Index, group = Regions, color = Regions)) +
geom_line(size = 0.5) + # Menggambar garis
geom_point(size = 3) + # Titik pada setiap tahun
theme_minimal() +
labs(title = "Anti-Corruption Behavior Index Indonesia 2022-2024",
subtitle = "Source: Central Statistic Agency",
x = "Years",
y = "Index") +
theme(legend.position = "right") +
scale_x_discrete(limits = c("2022", "2023", "2024")) +
scale_color_manual(values = c("Rural" = "red", "Urban" = "blue"))
## 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.
The graph shows Indonesia’s Anti-Corruption Behavior Index for the period 2022-2024, based on data from the Central Statistics Agency (BPS). Here are some key points in the data:
• In 2022, urban areas (blue line) had a higher index (~3.96) compared to rural areas (~3.88).
• In 2023, the anti-corruption index in both regions did not change significantly, with the rural index remaining stable, while the urban area slightly decreased.
• In 2024, there was a sharp decline in both regions, especially in rural areas where the index fell further than urban areas.
Overall, the trend in both regions shows a decline in the anti-corruption behavior index from 2022 to 2024, with a more drastic decline in rural areas.