Package Requirements for Migrated Blog Posts
This document lists the R and Python packages referenced in the migrated blog posts.
Trump Speech Readability Analysis Post
Location: blog/posts/trump-speech-readability/index.qmd
R Packages Required:
tidyverse- Data manipulation and visualizationreticulate- R interface to Pythonggthemes- Additional themes for ggplot2us2020election- Custom package with US election speeches data (https://github.com/mcnakhaee/us2020election)ggridges- Ridge plots for visualizationsshowtext(optional) - Font managementknitr- R Markdown support
Python Packages Required:
numpy- Numerical computingpandas- Data manipulationtextstat- Text readability metrics (https://github.com/shivam5992/textstat)
Installation Commands:
R Packages:
install.packages(c("tidyverse", "reticulate", "ggthemes", "ggridges", "showtext", "knitr"))
# Install us2020election from GitHub
# install.packages("devtools")
# devtools::install_github("mcnakhaee/us2020election")Python Packages:
pip install numpy pandas textstatCOVID-19 Netherlands Analysis Post
Location: blog/posts/covid-19-netherlands/index.qmd
R Packages Required:
tidyverse- Data manipulation and visualizationCoronaWatchNL- Custom package for Netherlands COVID-19 data (https://github.com/mcnakhaee/CoronaWatchNL)sf- Spatial data handlinggganimate- Animated visualizationssantoku- Data binning/choppinglubridate- Date/time handling (part of tidyverse)foreign- Reading foreign data formatsknitr- R Markdown support
Installation Commands:
R Packages:
install.packages(c("tidyverse", "sf", "gganimate", "santoku", "lubridate", "foreign", "knitr"))
# Install CoronaWatchNL from GitHub
# install.packages("devtools")
# devtools::install_github("mcnakhaee/CoronaWatchNL")Current Configuration
Both posts are currently configured with eval=FALSE for all code chunks. This means: - ✅ The code is displayed for educational purposes - ✅ The site renders without requiring all packages to be installed - ✅ No Python environment configuration is needed - ✅ Images and GIFs (if present in post directories) will still display
To Enable Code Execution
If you want to execute the code:
- Install all required packages (see above)
- For the Trump speech post, configure Python environment:
- Uncomment the reticulate configuration in the setup chunk
- Ensure you have a conda environment or use
reticulate::use_python()
- Change
eval=FALSEtoeval=TRUEin the chunks you want to run - Ensure data files and dependencies are available
Notes
- The
us2020electionandCoronaWatchNLpackages are custom packages that need to be installed from GitHub - Font configuration (Lobster, Poppins Light) may require system fonts to be installed
- Animation GIFs should be placed in the respective post directories if you want them to display
- The posts are currently optimized for display without execution, perfect for portfolio/documentation purposes