Last updated: 2021-10-07
Checks: 7 0
Knit directory: myTidyTuesday/
This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20210907)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 45daf3c. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: catboost_info/
Ignored: data/2021-09-08/
Ignored: data/CNHI_Excel_Chart.xlsx
Ignored: data/CommunityTreemap.jpeg
Ignored: data/Community_Roles.jpeg
Ignored: data/YammerDigitalDataScienceMembership.xlsx
Ignored: data/acs_poverty.rds
Ignored: data/fmhpi.rds
Ignored: data/grainstocks.rds
Ignored: data/hike_data.rds
Ignored: data/nber_rs.rmd
Ignored: data/netflixTitles.rmd
Ignored: data/netflixTitles2.rds
Ignored: data/us_states.rds
Ignored: data/us_states_hexgrid.geojson
Ignored: data/weatherstats_toronto_daily.csv
Untracked files:
Untracked: analysis/CHN_1_sp.rds
Untracked: analysis/sample data for r test.xlsx
Untracked: code/YammerReach.R
Untracked: code/work list batch targets.R
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/2021_05_11.Rmd
) and HTML (docs/2021_05_11.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | 45daf3c | opus1993 | 2021-10-07 | re-publish as-is |
The #TidyTuesday data this week is on Internet Access, from Microsoft by way of The Verge.
If broadband access was a problem before 2020, the pandemic turned it into a crisis. As everyday businesses moved online, city council meetings or court proceedings became near-inaccessible to anyone whose connection couldn’t support a Zoom call. Some school districts started providing Wi-Fi hotspots to students without a reliable home connection. In other districts, kids set up in McDonald’s parking lots just to get a reliable enough signal to do their homework. After years of slowly widening, the broadband gap became impossible to ignore.
First, let’s load libraries and set a ggplot theme:
options(tigris_use_cache = TRUE)
suppressPackageStartupMessages({
library(tidyverse)
library(hrbrthemes)
library(tidycensus)
library(sf)
library(patchwork)
})
source(here::here("code","_common.R"),
verbose = FALSE,
local = knitr::knit_global())
Registered S3 method overwritten by 'tune':
method from
required_pkgs.model_spec parsnip
ggplot2::theme_set(theme_jim(base_size = 12))
Loading the data
broadband_il <- tidytuesdayR::tt_load("2021-05-11")$broadband %>%
janitor::clean_names() %>%
filter(st == "IL") %>%
transmute(
GEOID = as.character(county_id),
usage = parse_number(broadband_usage, na = "-")
) %>%
left_join(get_acs(
geography = "county",
variables = "B19013_001",
state = "IL",
geometry = TRUE
))
Downloading file 1 of 2: `broadband.csv`
Downloading file 2 of 2: `broadband_zip.csv`
plot_il <- function(variable) {
broadband_il %>%
st_as_sf() %>%
ggplot(aes(fill = {{ variable }})) +
geom_sf(color = "gray80", size = 0.2) +
coord_sf(
label_axes = "----",
label_graticule = "----"
) +
theme(panel.grid.major = element_blank())
}
plot_il(estimate) +
scale_fill_viridis_b(
option = "plasma",
n.breaks = 8,
labels = scales::comma
) +
labs(
subtitle = "Median Household Income",
fill = "$US"
) +
plot_il(usage) +
scale_fill_viridis_b(
n.breaks = 8,
labels = scales::percent_format(accuracy = 1)
) +
labs(
subtitle = "High Speed Broadband Usage",
fill = NULL
) +
plot_annotation(
title = "High Speed Broadband in Illinois",
caption = "Data Sources: Microsoft and US Census ACS 2019 \n
Percent of people per county that use the internet at more than 25 Mbps/3 Mbps"
) &
theme(
plot.margin = margin(0.5, 0, 0, 0, "cm"),
plot.title = element_text(size = 30)
)
Related tweets and inspirations:
tweetrmd::include_tweet("https://twitter.com/jrosecalabrese/status/1392299000401858563")
My first contribution to #TidyTuesday — I compared Internet usage in my home state versus my current statehttps://t.co/Hh0yHclKvP pic.twitter.com/FjHmyonpEm
— Julianna Calabrese (@jrosecalabrese) May 12, 2021
tweetrmd::include_tweet("https://twitter.com/juliasilge/status/1392324410082689026")
This week's #TidyTuesday is about internet access across the US 👩🏽💻🧑🏻💻👨🏿💻 and I can hardly resist making maps of my home state of TX!!
— Julia Silge (@juliasilge) May 12, 2021
I used tidycensus to get median household income data 💰 for comparison; #rstats code is here:https://t.co/2vc5sXjwD7 pic.twitter.com/snHcGRnRAs
tweetrmd::include_tweet("https://twitter.com/jim_gruman/status/1392486129786572801")
My contribution to this week's #TidyTuesday on broadband internet access 🖥️💻🧑🎓👩🌾 in Illinoishttps://t.co/rQmigbCZCI pic.twitter.com/JFrFAQkQPn
— Jim Gruman📚🚵♂️⚙ (@jim_gruman) May 12, 2021
sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] patchwork_1.1.1 sf_1.0-2 tidycensus_1.1 hrbrthemes_0.8.0
[5] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4
[9] readr_2.0.2 tidyr_1.1.4 tibble_3.1.4 ggplot2_3.3.5
[13] tidyverse_1.3.1 workflowr_1.6.2
loaded via a namespace (and not attached):
[1] readxl_1.3.1 uuid_0.1-4 backports_1.2.1
[4] systemfonts_1.0.2 workflows_0.2.3 selectr_0.4-2
[7] plyr_1.8.6 tidytuesdayR_1.0.1 sp_1.4-5
[10] splines_4.1.1 listenv_0.8.0 usethis_2.0.1
[13] digest_0.6.28 foreach_1.5.1 htmltools_0.5.2
[16] yardstick_0.0.8 viridis_0.6.1 parsnip_0.1.7.900
[19] fansi_0.5.0 magrittr_2.0.1 tune_0.1.6
[22] tzdb_0.1.2 recipes_0.1.17 globals_0.14.0
[25] modelr_0.1.8 gower_0.2.2 extrafont_0.17
[28] vroom_1.5.5 R.utils_2.11.0 extrafontdb_1.0
[31] hardhat_0.1.6 rsample_0.1.0 dials_0.0.10
[34] colorspace_2.0-2 rvest_1.0.1 rappdirs_0.3.3
[37] textshaping_0.3.5 haven_2.4.3 xfun_0.26
[40] rgdal_1.5-27 crayon_1.4.1 jsonlite_1.7.2
[43] survival_3.2-11 tigris_1.5 iterators_1.0.13
[46] glue_1.4.2 gtable_0.3.0 ipred_0.9-12
[49] R.cache_0.15.0 tweetrmd_0.0.9 Rttf2pt1_1.3.8
[52] future.apply_1.8.1 scales_1.1.1 infer_1.0.0
[55] DBI_1.1.1 Rcpp_1.0.7 viridisLite_0.4.0
[58] units_0.7-2 bit_4.0.4 GPfit_1.0-8
[61] foreign_0.8-81 proxy_0.4-26 lava_1.6.10
[64] prodlim_2019.11.13 httr_1.4.2 wk_0.5.0
[67] ellipsis_0.3.2 farver_2.1.0 R.methodsS3_1.8.1
[70] pkgconfig_2.0.3 nnet_7.3-16 sass_0.4.0
[73] dbplyr_2.1.1 janitor_2.1.0 utf8_1.2.2
[76] here_1.0.1 labeling_0.4.2 tidyselect_1.1.1
[79] rlang_0.4.11 DiceDesign_1.9 later_1.3.0
[82] cachem_1.0.6 munsell_0.5.0 cellranger_1.1.0
[85] tools_4.1.1 cli_3.0.1 generics_0.1.0
[88] broom_0.7.9 evaluate_0.14 fastmap_1.1.0
[91] ragg_1.1.3 yaml_2.2.1 bit64_4.0.5
[94] knitr_1.36 fs_1.5.0 workflowsets_0.1.0
[97] s2_1.0.7 future_1.22.1 whisker_0.4
[100] R.oo_1.24.0 xml2_1.3.2 compiler_4.1.1
[103] rstudioapi_0.13 curl_4.3.2 e1071_1.7-9
[106] reprex_2.0.1 lhs_1.1.3 bslib_0.3.0
[109] stringi_1.7.5 highr_0.9 gdtools_0.2.3
[112] lattice_0.20-44 Matrix_1.3-4 styler_1.6.2
[115] classInt_0.4-3 conflicted_1.0.4 vctrs_0.3.8
[118] tidymodels_0.1.4 pillar_1.6.3 lifecycle_1.0.1
[121] furrr_0.2.3 jquerylib_0.1.4 maptools_1.1-2
[124] httpuv_1.6.3 R6_2.5.1 promises_1.2.0.1
[127] KernSmooth_2.23-20 gridExtra_2.3 parallelly_1.28.1
[130] codetools_0.2-18 MASS_7.3-54 assertthat_0.2.1
[133] rprojroot_2.0.2 withr_2.4.2 parallel_4.1.1
[136] hms_1.1.1 grid_4.1.1 rpart_4.1-15
[139] timeDate_3043.102 class_7.3-19 snakecase_0.11.0
[142] rmarkdown_2.11 git2r_0.28.0 pROC_1.18.0
[145] lubridate_1.7.10