November 9, 2022
Last update: November 15. 2022
In preparation for the dumpster fire that is Oregon election reporting, I previously posed on importing a directory of .csv files. At present, that is what I can find to build this. What does the interface look like?
library(magick) Img <- image_read("./img/SShot.png") image_ggplot(Img) This is terrible, there is a javascript button to download each separately. Nevertheless, here we go.
I want to learn about map and begin to replace my use of apply for everything.
Goal: import a directory full of csv files.
Method. First, load purrr and the tidyverse and then create a tibble for the filenames because we are creating the example. map wants to output a list so I have to unlist it into the tibble.
library(tidyverse) library(purrr) # Create a set of filenames fnames <- tibble( filenames=unlist( map(c(1:5), ~paste0("file",.
“You forgot to share your screen,” is one of the phrases that I will most closely associate with pandemic-era teaching. But, when deploying code in the classroom, screen sharing is not enough. quarto, reveal.js and multiplex: true have empowered me to be better at my job.
Many academics faced challenges in the transition to hybrid and fully online education during COVID-19. This post is dedicated to recent developments made easy by RStudio’s quarto project that solves three difficult and interrelated problems that frequently arose, and continue to arise, during the ongoing pandemic and in a hybrid teaching world.
A Pigeon It really is an amazing pigeon. Apologies that I haven’t a photo credit for it; I found it one day on twitter as it went viral. It is a New York City pigeon.
Pigeon
I want to color something with colors from that pigeon. It has an amazing array of colors.
TLDR: Extract colors from pigeon photo to palette. Then use palette in ggplot.
The Palette First, I have to get the color palette.
The tidycensus package is really neat. There is an example in the vignettes that tracks flows of people by county that I wanted to recreate for Hidalgo County Texas. The key information on how to do it is in the vignette on other datasets.
library(tidycensus) library(tidyverse) library(tigris) options(tigris_use_cache = TRUE) hidalgo_flows <- get_flows( geography = "county", state = "TX", county = "Hidalgo", year = 2018, geometry = TRUE ) First, to grab the flows of people.
The Data Robert Husseman @RHusseman on Twitter is running to represent Oregon District 21 in the Oregon House of Representatives. He has a platform that focuses on housing and livability in the state by making sensible allocations of public resources to public problems. He has an MBA; he was my student and his head and heart are very much in the right place to serve Oregon well.
The tidycensus package is really neat. There is an example in the vignettes that tracks flows of people by county that I wanted to recreate for Marion County Oregon. It is the vignette on other datasets.
library(tidycensus) library(tidyverse) library(tigris) options(tigris_use_cache = TRUE) marion_flows <- get_flows( geography = "county", state = "OR", county = "Marion", year = 2018, geometry = TRUE ) I want to directly as I can borrow this.