Below are a set of tasks that we will work on in class (either alone or in small groups).
Write a script that reads in data, calculates a statistic, and makes a plot.
Full Description Preview Readings & Tasks
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
Import data, generate and save a graphic.
Full Description Preview Readings & Tasks
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
Start using Github to manage course materials
Full Description Preview Readings & Tasks
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
Data wrangling plus more advanced ggplot
Full Description Preview Readings & Tasks
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
Data Transformation (Filtering, selecting, transforming)
Full Description Preview Readings & Tasks
Readings
Tasks
Quickly describe any functions that seem especially useful in the README.md file for this week.
Joining Relational Data
Full Description Preview Readings & Tasks
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
Joining data
Full Description Preview Readings & Tasks
Readings
Tasks
Briefly describe functions that seem especially useful in the README.md file for this week.
Working with Spatial Data and the sf package
Full Description Preview Readings & Tasks
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
Vector data processing. Integrating ‘traditional GIS’ analyses with statistical modelling. Data intersection, overlays, zonal statistics
Full Description Preview Readings & Tasks
Readings
Tasks
Quickly describe functions that seem especially useful in the README.md file for this week.
Use sf and raster to quantify maximum temperature for each country and then identify the hottest one on each continent.
Full Description Preview Readings & Tasks
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
Gridded spatial data
Full Description Preview Readings & Tasks
Readings
Tasks
Quickly describe functions that seem especially useful in the README.md file for this week.
Learning more about finding help
Full Description Preview Readings & Tasks
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.
Full Description Preview Readings & Tasks
Readings
Tasks
Complete project proposal and upload .Rmd and .md to Github
RMarkdown to create dynamic research outputs. Publishing to github/word/html/etc
Full Description Preview Readings & Tasks
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.
Data I/O. RMarkdown to create dynamic research outputs. Publishing to github/word/html/etc
Full Description Preview Readings & Tasks
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
Processing daily weather data from NOAA
Full Description Preview Readings & Tasks
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
Review project drafts from your peers
Full Description Preview Readings & Tasks
Readings
Tasks
Commit your first draft of your project to GitHub
Using DyGraph library.
Full Description Preview Readings & Tasks
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
Full Description Preview Readings & Tasks
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.
Optional Course Workshop
Full Description Preview Readings & Tasks
Readings
Tasks
Continue working on final project
Come to class with any questions
Building a species distribution model
Full Description Preview Readings & Tasks
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.
Present your project to the class
Full Description Preview Readings & Tasks
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
Commit the final version of your project
Full Description Preview Readings & Tasks
## Readings
Tasks
Finalize your project and commit to GitHub
Confirm the final version renders correctly on your website
Please enable JavaScript to view the comments powered by Disqus.