Willa’s Portfolio
  • Home
  • About Me

On this page

  • The Data
  • Starting Table
  • Top 7 Most Banned Books

Banned Books

Tables
Author

Willa Van Liew

An Analysis of the PEN America’s Index of School Book Bans from July 1, 2021 to June 30, 2022

The Data

Data Comes from PEN America’s Index of School Book Bans

Image From The State News

Starting Table

Show the code
books %>%
  mutate(Author = as.factor(Author), Title = as.factor(Title), `Type of Ban` = as.factor(`Type of Ban`), State = as.factor(State), District = as.factor(District), `Date of Challenge/Removal` = as.factor(`Date of Challenge/Removal`), `Origin of Challenge` = as.factor(`Origin of Challenge`)) %>%
  select(Author, Title, `Type of Ban`, State, `Date of Challenge/Removal`, `Origin of Challenge`) %>%
  datatable(filter= "top", options = list(pageLength = 5, autoWidth = TRUE), rownames=FALSE)

Top 7 Most Banned Books

Show the code
#Add links to purchase the books -> to authors homepage? 
booksTable = topbooks %>%
  select(image = image_url, Title, Author, numTimesBanned) %>%
  ungroup() %>%
  gt()%>%
  gt_img_rows(columns = image,img_source="local", height = 150)%>%
  tab_header(title = "The Most Banned Books from July 2021 - June 2022") %>%
  cols_label(
    Title = "Book Title",
    image = "Book Cover",
    Author = "Author",
    numTimesBanned = "Total Number of Bans"
  )
booksTable
The Most Banned Books from July 2021 - June 2022
Book Cover Book Title Author Total Number of Bans
Gender Queer: A Memoir Kobabe, Maia 41
All Boys Aren't Blue Johnson, George M. 29
Out of Darkness Pérez, Ashley Hope 23
The Bluest Eye Morrison, Toni 22
Lawn Boy Evison, Jonathan 17
The Hate U Give Thomas, Angie 17
The Absolutely True Diary of a Part-Time Indian Alexie, Sherman 16
Show the code
gtsave(booksTable, "../../img/bannedBooksTable.html")

References

Iannone, Richard, Joe Cheng, Barret Schloerke, Ellis Hughes, and JooYoung Seo. 2022. Gt: Easily Create Presentation-Ready Display Tables. https://CRAN.R-project.org/package=gt.
Mock, Thomas. 2022. gtExtras: Extending Gt for Beautiful HTML Tables. https://CRAN.R-project.org/package=gtExtras.
Müller, Kirill, and Hadley Wickham. 2023. Tibble: Simple Data Frames. https://CRAN.R-project.org/package=tibble.
Wickham, Hadley. 2016. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. https://ggplot2.tidyverse.org.
———. 2022a. Forcats: Tools for Working with Categorical Variables (Factors). https://CRAN.R-project.org/package=forcats.
———. 2022b. Stringr: Simple, Consistent Wrappers for Common String Operations. https://CRAN.R-project.org/package=stringr.
———. 2022c. Tidyverse: Easily Install and Load the Tidyverse. https://CRAN.R-project.org/package=tidyverse.
Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.” Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.
Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2022. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.
Wickham, Hadley, Romain François, Lionel Henry, Kirill Müller, and Davis Vaughan. 2023. Dplyr: A Grammar of Data Manipulation. https://CRAN.R-project.org/package=dplyr.
Wickham, Hadley, and Lionel Henry. 2023. Purrr: Functional Programming Tools. https://CRAN.R-project.org/package=purrr.
Wickham, Hadley, Jim Hester, and Jennifer Bryan. 2022. Readr: Read Rectangular Text Data. https://CRAN.R-project.org/package=readr.
Wickham, Hadley, Davis Vaughan, and Maximilian Girlich. 2023. Tidyr: Tidy Messy Data. https://CRAN.R-project.org/package=tidyr.
Xie, Yihui, Joe Cheng, and Xianying Tan. 2023. DT: A Wrapper of the JavaScript Library DataTables. https://github.com/rstudio/DT.