Publications by Kitada Smalley
DATA151: Maps in R
Learning Objectives In this lesson students will learn how to create Choropleths (colored map plots) Choropleths (Map Plots) Example 1: All Trails Step 1: Load the Data library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1...
3641 sym R (9133 sym/60 pcs) 14 img
(DATA151) Penguins
Learning Objectives In this lesson students will learn to apply categorical data analysis methods to data sets with fundamentally different structures. Wrangle different types of data using base R and Tidyverse functions in R. Implement exploratory data analysis techniques in R, including the following: Data visualization using ggplot Numerical d...
3236 sym R (6850 sym/40 pcs) 9 img
DATA502: Interactive Map Activity
Step 1: Connect to the Census API First you will need to get a API key: https://api.census.gov/data/key_signup.html Once you have an API key load it into your R environment so that you can access the ACS data. #install.packages("tidycensus") library(tidycensus) # YOUR CODE SHOULD LOOK LIKE THIS # census_api_key("INCLUDE YOUR API HERE") ## To insta...
1464 sym R (5410 sym/14 pcs)
DATA502: Tidy Census Demo
CODE UPDATED FALL 2024 DUE TO PACKAGE UPDATE Motivating Example In this demo we will be looking at factors for housing insecurity and homelessness in Seattle, Washington. Step 1: Polygon Maps library(tidyverse) #install.packages("maps") library(maps) wa_counties <- map_data("county", "washington") %>% select(lon = long, lat, group, id = subr...
3174 sym R (8441 sym/35 pcs) 10 img
DATA502: Intro US Map
Code UPDATED in Fall 2024 Due to change in package Motivating Example: In this demo we will be looking voter turn out data from IPUMS from 2016 and 2018. ## LOAD IN VOTER TURN-OUT DATA vote<-read.csv("https://raw.githubusercontent.com/kitadasmalley/DATA502/main/FALL2021/Data/voterTurnOut1618.csv", header=TRUE, stringsA...
368 sym R (4857 sym/13 pcs) 2 img
DATA151: Take a Hike!
Learning Objectives: Students will demonstrate their ability to translate questions into code using tidyverse packages and verbs. dplyr: filter(), mutate(), group_by(), summarise(), count(), ect ggplot2: ggplot(), aes(), geom_bar, geom_col, geom_histogram, geom_boxplot Step 0: Library tidyverse library(tidyverse) Step 1: Load the Data (AllTrails...
4524 sym R (15796 sym/39 pcs) 6 img
DATA151: Categorical Data (Tables and Bars)
Learning Objectives In this lesson students will learn to apply categorical data analysis methods to data sets with fundamentally different structures. Work with individual and cross-tabulated level raw data Create univarite tables to show marginal distributions Create two-way tables to show joint and conditional distributions Create bar graphs an...
5588 sym R (8126 sym/87 pcs) 19 img 4 tbl
DATA151: Tidyr and Joins (Updated 24)
Learning Objectives In this lesson students will gain more practice with the tidyverse with a particular focus on wrangling the tidyr package. This lesson covers: tidyr Package pivot_longer() (older version: gather()) pivot_wider() (older version spread()) unite() separate() Joins: left_join, inner_join, right_join UPDATED: October 2024 Before ...
2953 sym R (16346 sym/70 pcs) 7 img
DATA 151: Dplyr with Baseball
FALL 2024 Learning Objectives In this session students will learn the basics of working with dplyr verbs from the tidyverse as well as employ the pipe operator %>%. Use the piping operator %>% in your code to improve readability Employ dplyr Verbs filter() summarise() mutate() You will need to start by calling the tidyverse library. library(tid...
4136 sym R (10781 sym/38 pcs)
DATA502: Bars SOLUTIONS
Content Reference: This lab reference practice problems from “R for Data Science” - Chapter 3: Data Visualisation https://r4ds.had.co.nz/data-visualisation.html In this lab we will discuss and apply: Position Adjustments (for bars) Geometric Objects Example 1: Diamonds First, call the tidyverse package library(tidyverse) The diamonds dataset...
2460 sym R (3113 sym/18 pcs) 9 img