Publications by Tyler Simko
Gov 50: Exercises #2
Using the World Cup dataset, what is the average number of goals scored by all teams? Create a table that shows the number of times each team has won. Using the subset() function, show only data relevant to the US soccer team. Using indexing, save the first five rows of the dataset as a separate object. Bonus: Can you figure out how to subset the...
391 sym
Gov 50: Exercises #3
Download the pres_elections.csv dataset from Slack. Read it into R into an object named elect. Use View() and dim() to explore the dataset. How many rows and columns are there? Explain the structure of the rows – what do they represent? Create a column called dem_prop that turns the values in the democrat column into a proportion. Create a new ...
894 sym
Redist Workshop: #1 Mapping
1. Mapping First, we load some packages. tidyverse is helpful for general data manipulation, while sf will give us access to some powerful mapping tools. We can use st_read() to read in the shapefile (.shp) of the 2022 New Jersey plan. I downloaded this shapefile from Dave’s Redistricting. nj <- st_read("../data/district-shapes/nj_2022.shp") ##...
3732 sym R (9271 sym/62 pcs) 5 img