Skip to content
François edited this page May 14, 2013 · 4 revisions

Definitely not up-to-date list of sections and contents of the code deployed in the course. Short listing of examples first, longer contents follows.

  • [011] R: calc, objects [012] RStudio: packages, graphs [013] Hello World!

1_hello.R

  • [020] addition, logic [021] vectors, matrixes (grades) [022] factors and variables (real grades, BMI) [023] BMI

2_bmi.R

  • [030] functions [031] conditionals; probability distributions [032] iteration [033] HHI calculations

3_hhi.R

  • [040] WDI (API) [041] Daily Kos (Google Docs), QOG (CSV, PDF), scraping [042] CSI (reshape) and BJS data (ZIP, selective CSV, reshape) [043] Aggregation with Shor's data (XLSX) and DW-NOMINATE (Stata, aggregate)

4_congress.R

8_imf.R

  • [090] ICM Polls (dates, plots) [091] R & R [092] Quandl [093] Piketty & Saez (XLS, aggregate)

  • [100] Maps [101] Airports (geocoded) [102] [103] Simon Jackman, US two-party vote-shares


Part 1. Basics

0. Essentials

  • syllabus.pdf
  • 01_intro.R
  • 02_readings.R
  1. Introduction
  • How we got there
  • What is data analysis?
  • Who is this for
  • Course outline
  • Course requirements
  • Disclosure
  1. Readings
  • Course handbooks
  • Additional readings
  • Tutorials
  • Blogs

1. Setup

  1. Setup
  • Computer equipment
  • Computer skills
  1. Installing R
  • Installation
  • Commands
  • Syntax
  • Assignment
  • Exit
  1. Installing RStudio
  • Installation
  • Interface
  • Running scripts
  • Setting the working directory
  • Tab auto-completion
  • Packages
  • Drawing and saving plots
  • Help pages
  1. Practice session
  • Folder architecture
  • "Hello, R World" (redux)

Exercise 1

  • RStudio interface basics
  • Command line tricks
  • Data objects
  • R functions
  • R mathematics
  • Vectors
  • Help pages
  • Workspace commands
  • Disk files
  • Quitting R

2. Objects

  • 20_basics.R
  • 21_syntax.R
  • 22_vectors.R
  • 23_objects.R
  1. Objects
  2. Vectors and matrixes
  3. Variables and factors
  4. Practice

Exercise 2

  • a
  • b
  • c

3. Functions

  • 30_math.R
  • 31_functions.R
  • 32_loops.R
  • 33_proba.R
  1. Functions
  2. i
  3. i
  4. i

Exercise 3

  • a
  • b
  • c

4. Data

  • 40_data.R
  • 41_dataio.R
  • 42_reshaping.R
  • 43_scraping.R
  1. Data
  2. i
  3. i
  4. i

Exercise 4

  • a
  • b
  • c

Part 2. Analysis

  • 50_clusters.R
  • 51_heatmaps.R
  • 52_pca.R
  • 53_kmeans.R
  • 60_distributions.R
  • 61_descr.R
  • 62_pdf.R
  • 63_ecdf.R
  • 70_hyptests.R
  • 71_ci.R
  • 72_ttest.R
  • 73_prtest.R
  • 80_lin.R
  • 81_scatterplots.R
  • 82_regression.R
  • 83_vwreg.R
    • 83_vwreg_ggplot2.R by David Sparks
    • 83_vwreg.R by Felix Schönbrodt

Part 3. Extensions

  • 90_ts.R
  • 91_lags.R
  • 92_smoothing.R
    • example: smoothing trends in assault deaths in the United States
    • dataset: Bureau of Justice Statistics (htus8008)
  • 100_maps.R
  • 101_choropleth.R
  • 102_gmaps.R
  • 110_networks.R
  • 111_influence.R
  • 112_twitter.R
  • 120_data.R