Econ 106: Computer programming for economics


Class schedule: Monday and Thursday | 13:00 - 14:00 Room Econ-135
Laboratory schedule: Wednesday | 10:00 - 13:00
Instructor: Christopher Llones
e-mail: christopher.llones@vsu.edu.ph
Pre-requisites: Math 13
Course credits: 3 units
Number of hours: 2 hrs lectures and 3 hrs laboratory per week


Course description

This course introduces students to computer programming using R, with applications in economics. It covers the installation and use of R and RStudio, packages and help pages, R objects and notation, data management with Tidyverse, data visualization with ggplot2, exploratory data analysis, reproducible reporting with Quarto, version control with Git/GitHub, and Quarto website creation. By the end of the course, students will be able to design transparent, reproducible workflows for economic data analysis and communicate results effectively.

Course outcomes

  • CO1: Demonstrate foundational proficiency in R programming.
  • CO2: Apply data management and visualization techniques for economic analysis
  • CO3: Conduct exploratory data analysis and produce reproducible reports.
  • CO4: Utilize collaborative tools and digital publishing for reproducible workflows.

Course outline

Topics Lessons Description
Module 1: Introduction to R Programming
  1. Installing R and RStudio
  2. Packages and help pages
  3. R objects
  4. R notation
  1. Learn to install and configure R and RStudio.
  2. Understand how to install, load, and manage R packages. Explore R’s built-in help system and documentation for functions and datasets.
  3. Learn about fundamental R objects including vectors, matrices, lists, and data frames. Understand how to create, manipulate, and inspect objects.
  4. Develop proficiency in R’s notation, including indexing, subsetting, applying functions to objects.
Module 2: Data management and transformation with Tidyverse
  1. Introduction to Tidyverse
  2. dplyr basics
  3. Data reshaping
  4. Handling missing data
  5. Case studies
  1. Understand the philosophy of Tidyverse and its role in data science workflows.
  2. Learn functions for filtering, selecting, mutating, summarizing, and arranging data.
  3. Apply pivoting and joining techniques to restructure datasets.
  4. Identify, manage, and impute missing values in datasets.
Module 3: Data visualization with ggplot2
  1. Grammar of graphics
  2. Basic plots
  3. Mapping aesthetics
  4. Geometries and faceting
  5. Themes and export
  1. Understand the grammar of graphics and its role in structuring visualizations.
  2. Create histograms, bar charts, boxplots, and scatterplots.
  3. Map variables to color, shapes, to enhance interpretability.
  4. Apply geometries and faceting techniques for comparative analysis.
  5. Modify plot themes and export visualizations for reports and presentations.
Module 4: Exploratory data analysis (EDA)
  1. Rudiments of EDA
  2. Charts and tables
  3. Measures of central tendency
  4. Dispersion and distribution
  5. Contingency tables and scatterplots
  1. Discuss EDA as the first step in data analysis.
  2. Summarize and visualize data using tables and plots.
  3. Compute and interpret mean, median, mode, and quantiles.
  4. Analyze variance, standard deviation, skewness, and kurtosis.
  5. Explore relationship between categorical variables and continuous variables.
Module 5: Data analysis report with Quarto
  1. Introduction to Quarto
  2. Embedding R code
  3. Formatting outputs
  4. Rendering reports
  5. Exporting reports
  1. Learn to create dynamic, reproducible documents using Quarto and markdown syntax.
  2. Integrate R code and inline calculations within narrative text
  3. Format tables and plots for professional presentation.
  4. Render reports to multiple formats (HTML, PDF, Word)
  5. Produce transparent, replicable research outputs for academic and policy contexts.
Module 6: Version control with Git and Github
  1. Introductin to Git
  2. Git workflows
  3. Github basics
  4. Practical application
  1. Understand the basics of version control and why it matters in programming and research.
  2. Learn to initialize repositories, commit changes, and manage branches.
  3. Push repositories to Github, collaborate with peers, and manage issues.
  4. Apply Git/Github to manage R projects and Quarto reports.
Module 7: Creating a Quarto website
  1. Introduction to Quarto websites
  2. Website setup
  3. Embedding content
  4. Publishing
  5. Case study
  1. Learn the structure and purpose of Quarto websites for academic and project communication.
  2. Create a basic Quarto website, configure navigation, and customize themes.
  3. Add pages, plots, tables, and interactive elements.
  4. Deploy websites to Github Pages for public access.
  5. Build a simple course or project website showcasing economic data analysis.