Skip to content

eklucas/R-intro-GIJC25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R-intro-GIJC25

Materials for Intro to R Programming (Parts 1 and 2) at GIJC in Kuala Lumpur

Installing R and RStudio

Install both R and RStudio on your own computer using these instructions: https://bit.ly/ire-install-r

You can also create an account with Posit.Cloud and use RStudio through your browser (without installing anything on your computer) but the free account has some limitations (size of data you can process, how many projects you can create, etc).

Install the necessary packages for this material by running this code in the RStudio console (you only need to do this once on your computer):
install.packages(c("tidyverse","janitor","readxl","googlesheets4"))

Running the scripts in this repo

If you download this repo to your own computer, be sure to open RStudio by double-clicking on the R-intro-GIJC25.Rproj file in the main folder. This will ensure that all the code to import files works.

The .Rproj file ensures that RStudio uses the R-intro-GIJC25 folder as its home base, so to import files located in the data folder you only need to specify "data/file.csv" inside of read_csv().

Finished Scripts:

You can find complete and annotated scripts for the main concepts in the /scripts folder.

Primary Datasets:

  • Population by country, literacy, age, sex and urban/rural residence (from the UN)
    Source
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/UN_literacy.csv

  • Eurovision (created by my former student Mariia Novoselia)
    Source
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/Eurovision.csv

  • Poverty in the United States (by state and county)
    Source
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/US_poverty.csv

  • US Federal Campaign Transactions (for independent expenditures)
    Source
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/transactions.csv

Sample datasets (used only for specific examples)

  • disney_movies_total_gross.csv
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/disney_movies_total_gross.csv

  • osha.csv
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/osha.csv

  • transactions.csv
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/transactions.csv

  • committees.csv
    Link for import: https://github.com/eklucas/R-intro-GIJC25/raw/refs/heads/main/data/committees.csv

Tipsheets:

You'll find useful "cheatsheets" for Tidyverse packages along with some helpful tipsheets I created on R Functions, an R dictionary, a guide for newsroom math (created by Steve Doig)

About

Materials for Intro to R Programming (Parts 1 and 2) at GIJC in Kuala Lumpur

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages