Below are a set of tasks that we will work on in class (either alone or in small groups).


CS_01 : Create a simple, functioning script

Write a script that reads in data, calculates a statistic, and makes a plot.

Full Description

Readings

Tasks

  • Create a new R script in RStudio
  • Load the iris dataset with data(iris)
  • Calculate the mean of the Petal.Length field
  • Plot the distribution of the Petal.Length column as a histogram
  • Save the script
  • Click ‘Source’ in RStudio to run it from beginning to end

TK_01 : Git-01

Install Git and get organized!

Full Description

Readings

Tasks


CS_02 : My grandfather says climate is cooling

Import data, generate and save a graphic.

Full Description

Readings

Tasks

  • Create a new R script in RStudio
  • Load data from a comma-separated-values formatted text file hosted on a website
  • Graph the annual mean temperature in June, July and August (JJA) using ggplot
  • Add a smooth line with geom_smooth()
  • Add informative axis labels using xlab() and ylab() including units
  • Add a graph title with ggtitle()
  • Save a graphic to a png file using png() and dev.off() OR ggsave
  • Save the script
  • Click ‘Source’ in RStudio to run the script from beginning to end to re-run the entire process

TK_02 : Git-02

Start using Github to manage course materials

Full Description

Readings

Tasks

  • Create a new repository for this course by following this link.
  • Create a new project in Rstudio and connect it to the new repository in GitHub (these are labeled YEAR-GEO503-GITHUBUSERNAME). Helpful instructions are here
  • Edit the README.md file in your repository to include a brief description of the repository (e.g. “Coursework for Spatial Data Science”).
  • Stage and Commit your changes to Git (using the git tab in the upper right of RStudio)
  • Push the repository up to GitHub

CS_03 : Wealth over time

Data wrangling plus more advanced ggplot

Full Description

Readings

Tasks

  • Recreate layered graphics with ggplot including raw and transformed data
  • Save graphical output as a .png file
  • Save your script as a .R or .Rmd in your course repository

TK_03 : Data Wrangling

Data Transformation (Filtering, selecting, transforming)

Full Description

Readings

Tasks

  • Quickly describe any functions that seem especially useful in the README.md file for this week.

CS_04 : Farthest airport from New York City

Joining Relational Data

Full Description

Readings

Tasks

  • Join two datasets using a common column
  • Answer a question that requires understanding how multiple tables are related
  • Save your script as a .R or .Rmd in your course repository

TK_04 : Data Wrangling 2

Joining data

Full Description

Readings

Tasks

  • Briefly describe functions that seem especially useful in the README.md file for this week.

CS_05 : Beware the Canadians!

Working with Spatial Data and the sf package

Full Description

Readings

Tasks

  • Reproject spatial data using st_transform()
  • Perform spatial operations on spatial data (e.g. intersection and buffering)
  • Generate a polygon that includes all land in NY that is within 10km of the Canadian border and calculate the area
  • Save your script as a .R or .Rmd in your course repository

TK_05 : Spatial Vector Data

Vector data processing. Integrating ‘traditional GIS’ analyses with statistical modelling. Data intersection, overlays, zonal statistics

Full Description

Readings

Tasks

  • Quickly describe functions that seem especially useful in the README.md file for this week.

CS_06 : Find hottest country on each continent

Use sf and raster to quantify maximum temperature for each country and then identify the hottest one on each continent.

Full Description

Readings

  • Raster Vector Interactions GCR

Tasks

  • Calculate annual maximum temperatures from a monthly spatio-temporal dataset
  • Remove Antarctica from the world dataset
  • Summarize raster values within polygons
  • Generate a summary figure and table.
  • Save your script as a .R or .Rmd in your course repository

TK_06 : Spatial Raster Data

Gridded spatial data

Full Description

Readings

Tasks

  • Quickly describe functions that seem especially useful in the README.md file for this week.

CS_07 : Getting Help!

Learning more about finding help

Full Description

Readings

Tasks

  • Learn how to read R help files effectively
  • Learn how to search for help
  • Learn how to create a Minimum Working Example (MWE)
  • Debug existing code
  • Save your reprex to your course repository as an html file using Export -> “Save As Webpage” in the RStudio “Viewer” Tab.

TK_07 : Project Proposal

Full Description

Readings

Tasks

  • Complete project proposal and upload .Rmd and .md to Github

CS_08 : One Script, Many Products

RMarkdown to create dynamic research outputs. Publishing to github/word/html/etc

Full Description

Readings

Tasks

  • Create a new RMarkdown Document in Rstudio with File -> New File -> R Markdown and save it in the case_study folder for this session
  • Click “Knit” button or File -> Knit Document to generate an HTML document
  • Adjust the YAML header to produce a HTML, Word, and PDF version of the document.
  • Save the outputs in your course folder for this week
  • Think about how you could use this “one document, several outputs” approach in a project and make a few notes in your README.md file for this session.

TK_08 : Create Final Project Webpage

Data I/O. RMarkdown to create dynamic research outputs. Publishing to github/word/html/etc

Full Description

Readings

Tasks

  • Create repository for final project
  • Explore various options for your project website
  • Push changes back to GitHub
  • Enable website on GitHub
  • Complete DataCamp Course in Reporting with R Markdown

TK_09 : APIs, time-series, and weather Data

Processing daily weather data from NOAA

Full Description

Readings

Tasks

  • Access and work with station weather data from Global Historical Climate Network (GHCN)
  • Explore options for plotting timeseries
  • Trend analysis
  • Compute Climate Extremes

TK_11 : Project First Draft

Review project drafts from your peers

Full Description

Readings

Tasks

  • Commit your first draft of your project to GitHub

CS_12 : Dynamic HTML graph of Daily Temperatures

Using DyGraph library.

Full Description

Readings

Tasks

  • Download daily weather data for Buffalo, NY using an API
  • Generate a dynamic html visualization of the timeseries.
  • Save the graph using Export->Save as Webpage

TK_12 : Project Peer Review

Full Description

Readings

Tasks

  • Review at least two other students’ projects and make comments via a pull request in GitHub before next class next week.
  • Browse the Leaflet website and take notes in your readme.md about potential uses in your project. What data could you use? How would you display it?
  • Browse the HTML Widgets page for many more examples. Take notes in your readme.md about potential uses in your project.

TK_13 : Thanksgiving Week (Tuesday Class Optional)

Optional Course Workshop

Full Description

Readings

  • NULL

Tasks

  • Continue working on final project
  • Come to class with any questions

TK_14 : Final Project 2nd Draft / Building and summarizing models

Building a species distribution model

Full Description

Readings

Tasks

  • Commit second draft of final project to GitHub for review
  • Demonstrate a simple presence/absence model in spatial context.
  • Model spatial dependence (autocorrelation) in the response.

TK_15 : Final Presentation

Present your project to the class

Full Description

Readings

Tasks

  • Prepare to give your 5 minute presentation
  • Present your analysis to your roommates, significant other, etc. and update your presentation based on the feedback
  • Get feedback from 2-3 fellow classmates on your presentation and update it based on their feedback
  • Give your 5 minute presentation in class

TK_16 : Publish Final Project

Commit the final version of your project

Full Description

## Readings

Tasks

  • Finalize your project and commit to GitHub
  • Confirm the final version renders correctly on your website