- 廖傑恩 Jay Liao | jay.chiehen[at]gmail.com | Department of Psychology | National Cheng Kung University
- 李唐榮 TJ Lee | u38081046[at]gs.ncku.edu.tw | Institute of Education | National Cheng Kung University
This is a final project presentation for Data Management, a course National Cheng Kung University, Taiwan. In brief, we analyzed three votes in Kaohsiung in 2018-2020. We used map plotting and shiny
app to demonstrate some finding and to visualize data. Cluster analysis and regularized regression were utilized to address further exploration.
README.md
: This file.KHvotes_presentation_forMac.Rmd
: The code file of ioslides with shiny web app, markdown, and mathjax (for Mac)KHvotes_presentation_forWin.Rmd
: The code file of ioslides with shiny web app, markdown, and mathjax (for Windows)KHvotes.R
: This is the pure R code file writing in the process of analysis. This is not well-organized, thus using above .Rmd files is recommended.
data/mapdata202003270418/TOWN_MOI_1090324.shp
: The map file of Taiwan with shapes of cities, counties, and townshipsdata/Mayor_2018_KH.xls
: The result of Mayor election in Kaohsiung in 2018data/President_2020_KH.xls
: The subset of Kaohsiung city of the result of Presidential election in Taiwan in 2020data/Mayor_recall_2020_KH.xlsx
: The result of Mayor recall vote in Kaohsiung in 2020- Files in
data/demography
: Demography variables of 38 districts in Kaohsiung City
Directly open https://jay-chiehen.shinyapps.io/KHvotes_2018-2020_presentation/ through the browser.
-
Install the latest version of R and RStudio.
-
Install all required packages:
install.packages('shiny')
install.packages('dplyr')
install.packages('ggplot2')
install.packages('sf')
install.packages('leaflet')
install.packages('leafem')
install.packages('mapview')
install.packages('readxl')
install.packages('robustHD')
install.packages('glmnet')
-
Open either
KHvotes_presentation_forMac.Rmd
orKHvotes_presentation_forWin.Rmd
on RStudio and edit it if you want. For example, you can change the presentation format into the document format. It is recommended to save the edited file as the other file with different name. -
Click
Run Presentation
to construct the web app.