Code
utils::install.packages("report")
This week we will be “bringing it all together” as we summarize our project and report on our findings to our “stakeholders”.
You may be familiar with the structure of research reports from previous social and physical science courses. For example, the APA guidelines for quantitative student and professional papers include the following sections:
While evaluation and data analytics reports are not required to follow this exact outline, industry-leading templates often closely mirror this layout in order to ensure that non-technical audiences can easily find the sections of the reports that are most relevant for their needs.
For the purposes of our project, this week we will update our Markdown file from Lab 01 with a brief introduction to the project and then create a Results and Conclusion .RMD, .MD, and .HTML file where we will discuss the findings from our evaluation of the impact of the NMTC and LIHTC programs on social vulnerability and economic outcomes in our division.
If you would like to review additional readings on best practices for writing evaluation and data analytics reports, check out the following links:
utils::install.packages("report")
# Load SVI data sets
## Raw data
svi_2010 <- readRDS(here::here("data/raw/Census_Data_SVI/svi_2010_trt10.rds"))
svi_2020 <- readRDS(here::here("data/raw/Census_Data_SVI/svi_2020_trt10.rds"))
### Divisional data
svi_2010_divisional <- load_svi_data(svi_2010, rank_by = "divisional", location = census_division, percentile=.75)
svi_2020_divisional <- load_svi_data(svi_2020, rank_by = "divisional", location = census_division, percentile=.75)
svi_divisional <- merge_svi_data(svi_2010_divisional, svi_2020_divisional)
### National data
svi_2010_national <- load_svi_data(svi_2010, percentile=.75)
svi_2020_national <- load_svi_data(svi_2020, percentile=.75)
svi_national <- merge_svi_data(svi_2010_national, svi_2020_national)
### NMTC Data
svi_divisional_nmtc_df <- readRDS(here::here(paste0("data/rodeo/", str_replace_all(census_division, " ", "_"), "_svi_divisional_nmtc.rds")))
svi_national_nmtc_df <- readRDS(file = here::here(paste0("data/rodeo/", str_replace_all(census_division, " ", "_"), "_svi_national_nmtc.rds")))
### LIHTC Data
svi_divisional_lihtc_df <- readRDS(here::here(paste0("data/rodeo/", str_replace_all(census_division, " ", "_"), "_svi_divisional_lihtc.rds")))
svi_national_lihtc_df <- readRDS(here::here(paste0("data/rodeo/", str_replace_all(census_division, " ", "_"), "_svi_national_lihtc.rds")))
# Load model data
load(here::here(paste0("data/rodeo/", str_replace_all(census_division, " ", "_"), "_svi_did_models_nmtc.RData")))
load(here::here(paste0("data/rodeo/", str_replace_all(census_division, " ", "_"), "_svi_did_models_lihtc.RData")))
First, we will want to return to our Lab 01 Markdown file where we first queried the census API to find the population of our division of choice. This is where we will write the introduction for our project.
Write 3-5 paragraphs covering the following:
Indicate the region that your division is assigned to and the states that are part of the division (you can refer to the US Census Bureau’s documentation: https://www2.census.gov/geo/pdfs/maps-data/maps/reference/us_regdiv.pdf)
Summarize population count overall and by gender breakdown
Discuss what the project hopes to accomplish, what data will be examined, and an hypothesis of what expect the outcomes of the project to be.
You can review an example introduction on the demo project website here: https://watts-college.github.io/paf-515-example-website/docs/middle_atlantic_division/lab01_courtney/
You can also review the Final Project Guide section descriptions (focus on Executive Summary since the intro will serve as a mini exec summary for your division): https://r-class.github.io/cpp-528-example-repo/Final-Project-Guide.html#project-overview
Once you have written your introduction, save your .MD file with the updated text.
Once you have completed your introduction, you can then begin working on your Results and Conclusion file.
Create a new .RMD file in the labs/wk06/
folder:
Write a brief 1-2 paragraph introduction summarizing the purpose of the project (what are we studying? how are we measuring our outcomes?), data used for the project (what are our sources of data? ), the analysis methods employed (recall we conducted spatial analyses (choropleth and bivariate mapping), correlation analyses, k-means clustering, and finally diff-in-diff regression analysis), the overall results (did you find the NMTC or LIHTC programs to be effective? if not, was there any correlation between tracts that received funds and vulnerability levels? any other interesting findings?), and any conclusions/suggestions for future studies (what is important for the stakeholders to know? what do you think would be useful to know that you couldn’t discover?).
This will be a summary of the subsequent sections. Thus, you may find it most useful to write this section last.
In this section, you will want to write 2-5 paragraphs that discuss the details of your data. Answers to the following questions should be incorporated in the paragraphs:
What was the source of the SVI data (recall from Lab 02 that we pulled US Census Data on a tract-level for 2010 and on a Census Block Group level for 2020 that was crosswalked to 2010 tracts with the NHGIS crosswalk)?
How many rows were in your raw SVI data sets nationally for 2010 and 2020?
How many tracts were in your division for 2010 and 2020?
What were the most vulnerable areas in your division based on the tracts’ County and State membership (refer back to Lab 02)?
How were tracts identified as eligible for the NMTC and LIHTC programs (Refer back to Lab 04; recall that we selected tracts that had not previously received tax dollars. You can also briefly discuss the eligibility criteria set by the programs/include a reference)?
How many tracts were eligible for the NMTC and LIHTC programs, respectively?
What other measures of social vulnerability/economic outcomes were part of the project? What were the data sources (recall HPI, Median Income, Median Home Value from Lab 05)?
How did we group data for our analyses (recall county grouping in Labs 03 and 04 and metro level grouping in Lab 05)?
Note: While most of the answers should be in your previous labs, feel free to query your data here as needed, just hide the code chunks and output from your final file. You only want written information here.
For our analysis section we will discuss our analytical process throughout the project. This should be 1-3 paragraphs.
To assist with writing our results section on our diff-in-diff models we will utilize the R package report
along with some additional text to create a function.
If you’d like to learn more about this useful package, checkout the documentation: https://easystats.github.io/report/reference/report.lm.html?
For this project, we will create a function called write_model_outcomes()
which will give us a written report on the statistical outcomes for our input model.
Once we have our function created and our inputs entered, all we have to do is take the output of the function and copy and paste it into our .RMD file:
Remember to add functions to your project_data_steps.R file (i.e. project_data_steps_CS.R). Also be sure to hide the function code chunks used to generate your text using echo=FALSE
. You can also skip running them during your knitting process by setting eval=FALSE
since we will be copy and pasting the output and do not want the chunks to run for our final file.
write_model_outcomes <- function(df, program, measure) {
# Find outcome of treat x post
outcome <- report_parameters(df)
outcome <- outcome[length(outcome)]
# Write report findings
if (grepl("non-significant", outcome) ) {
cat(paste(paste0("We fitted a ", report_model(df), " where treat represents ", program, " program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects."), report_performance(df), outcome, paste0("Since the effect of treat x post is not statistically significant, we cannot conclude that the ", program, " program had a measurable impact on ", measure, "-related social vulnerability and economic outcomes."), sep="\n\n"))
} else {
cat(paste(paste0("We fitted a ", report_model(df), " where treat represents ", program, " program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects."), report_performance(df), outcome, paste0("Since the effect of treat x post is statistically significant, we can conclude that the ", program, " program had a measurable impact on ", measure, "-related social vulnerability and economic outcomes."), sep="\n\n"))
}
}
write_model_outcomes(m1_nmtc_div, "NMTC", "socioeconomic status")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_SES with treat, post and cbsa (formula: SVI_FLAG_COUNT_SES ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and moderate proportion of variance (R2 = 0.18, F(50, 7187) = 32.37, p < .001, adj. R2 = 0.18)
The effect of treat × post is statistically significant and negative (beta = -0.42, 95% CI [-0.73, -0.12], t(7187) = -2.72, p = 0.007; Std. beta = -0.03, 95% CI [-0.05, -8.08e-03])
Since the effect of treat x post is statistically significant, we can conclude that the NMTC program had a measurable impact on socioeconomic status-related social vulnerability and economic outcomes.
write_model_outcomes(m2_nmtc_div, "NMTC", "household characteristics")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_HHCHAR with treat, post and cbsa (formula: SVI_FLAG_COUNT_HHCHAR ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and weak proportion of variance (R2 = 0.06, F(50, 7187) = 9.16, p < .001, adj. R2 = 0.05)
The effect of treat × post is statistically non-significant and negative (beta = -0.06, 95% CI [-0.29, 0.17], t(7187) = -0.51, p = 0.608; Std. beta = -5.87e-03, 95% CI [-0.03, 0.02])
Since the effect of treat x post is not statistically significant, we cannot conclude that the NMTC program had a measurable impact on household characteristics-related social vulnerability and economic outcomes.
write_model_outcomes(m3_nmtc_div, "NMTC", "racial and ethnic minority status")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_REM with treat, post and cbsa (formula: SVI_FLAG_COUNT_REM ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and substantial proportion of variance (R2 = 0.34, F(50, 7187) = 74.72, p < .001, adj. R2 = 0.34)
The effect of treat × post is statistically non-significant and negative (beta = -0.05, 95% CI [-0.13, 0.04], t(7187) = -1.02, p = 0.309; Std. beta = -9.74e-03, 95% CI [-0.03, 9.01e-03])
Since the effect of treat x post is not statistically significant, we cannot conclude that the NMTC program had a measurable impact on racial and ethnic minority status-related social vulnerability and economic outcomes.
write_model_outcomes(m4_nmtc_div, "NMTC", "housing and transportation access")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_HOUSETRANSPT with treat, post and cbsa (formula: SVI_FLAG_COUNT_HOUSETRANSPT ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and substantial proportion of variance (R2 = 0.31, F(50, 7187) = 65.39, p < .001, adj. R2 = 0.31)
The effect of treat × post is statistically non-significant and negative (beta = -0.03, 95% CI [-0.24, 0.19], t(7187) = -0.26, p = 0.795; Std. beta = -2.54e-03, 95% CI [-0.02, 0.02])
Since the effect of treat x post is not statistically significant, we cannot conclude that the NMTC program had a measurable impact on housing and transportation access-related social vulnerability and economic outcomes.
write_model_outcomes(m5_nmtc_div, "NMTC", "socioeconomic, household characteristics, racial and ethnic minority status, and housing and transportation access")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_OVERALL with treat, post and cbsa (formula: SVI_FLAG_COUNT_OVERALL ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and substantial proportion of variance (R2 = 0.27, F(50, 7187) = 52.77, p < .001, adj. R2 = 0.26)
The effect of treat × post is statistically non-significant and negative (beta = -0.56, 95% CI [-1.17, 0.05], t(7187) = -1.80, p = 0.072; Std. beta = -0.02, 95% CI [-0.04, 1.62e-03])
Since the effect of treat x post is not statistically significant, we cannot conclude that the NMTC program had a measurable impact on socioeconomic, household characteristics, racial and ethnic minority status, and housing and transportation access-related social vulnerability and economic outcomes.
write_model_outcomes(m6_nmtc_div, "NMTC", "Median Income")
We fitted a linear model (estimated using OLS) to predict MEDIAN_INCOME with treat, post and cbsa (formula: MEDIAN_INCOME ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and weak proportion of variance (R2 = 0.09, F(50, 7185) = 13.83, p < .001, adj. R2 = 0.08)
The effect of treat × post is statistically non-significant and positive (beta = 0.06, 95% CI [-7.16e-03, 0.14], t(7185) = 1.76, p = 0.078; Std. beta = 0.02, 95% CI [-2.22e-03, 0.04])
Since the effect of treat x post is not statistically significant, we cannot conclude that the NMTC program had a measurable impact on Median Income-related social vulnerability and economic outcomes.
write_model_outcomes(m7_nmtc_div, "NMTC", "Median Home Value")
We fitted a linear model (estimated using OLS) to predict MEDIAN_HOME_VALUE with treat, post and cbsa (formula: MEDIAN_HOME_VALUE ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and substantial proportion of variance (R2 = 0.73, F(50, 6737) = 362.45, p < .001, adj. R2 = 0.73)
The effect of treat × post is statistically significant and positive (beta = 0.11, 95% CI [5.76e-03, 0.22], t(6737) = 2.07, p = 0.039; Std. beta = 0.01, 95% CI [6.80e-04, 0.03])
Since the effect of treat x post is statistically significant, we can conclude that the NMTC program had a measurable impact on Median Home Value-related social vulnerability and economic outcomes.
write_model_outcomes(m8_nmtc_div, "NMTC", "House Price Index")
We fitted a linear model (estimated using OLS) to predict HOUSE_PRICE_INDEX with treat, post and cbsa (formula: HOUSE_PRICE_INDEX ~ treat + post + treat * post + cbsa) where treat represents NMTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and substantial proportion of variance (R2 = 0.32, F(45, 1974) = 20.40, p < .001, adj. R2 = 0.30)
The effect of treat × post is statistically non-significant and positive (beta = 0.05, 95% CI [-0.13, 0.23], t(1974) = 0.55, p = 0.583; Std. beta = 0.01, 95% CI [-0.03, 0.05])
Since the effect of treat x post is not statistically significant, we cannot conclude that the NMTC program had a measurable impact on House Price Index-related social vulnerability and economic outcomes.
write_model_outcomes(m1_lihtc_div, "LIHTC", "socioeconomic status")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_SES with treat, post and cbsa (formula: SVI_FLAG_COUNT_SES ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and moderate proportion of variance (R2 = 0.15, F(34, 1279) = 6.39, p < .001, adj. R2 = 0.12)
The effect of treat × post is statistically non-significant and positive (beta = 0.10, 95% CI [-0.27, 0.47], t(1279) = 0.53, p = 0.596; Std. beta = 0.01, 95% CI [-0.04, 0.06])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on socioeconomic status-related social vulnerability and economic outcomes.
write_model_outcomes(m2_lihtc_div, "LIHTC", "household characteristics")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_HHCHAR with treat, post and cbsa (formula: SVI_FLAG_COUNT_HHCHAR ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and moderate proportion of variance (R2 = 0.14, F(34, 1279) = 5.95, p < .001, adj. R2 = 0.11)
The effect of treat × post is statistically non-significant and positive (beta = 0.20, 95% CI [-0.13, 0.53], t(1279) = 1.18, p = 0.236; Std. beta = 0.03, 95% CI [-0.02, 0.08])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on household characteristics-related social vulnerability and economic outcomes.
write_model_outcomes(m3_lihtc_div, "LIHTC", "racial and ethnic minority status")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_REM with treat, post and cbsa (formula: SVI_FLAG_COUNT_REM ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and substantial proportion of variance (R2 = 0.27, F(34, 1279) = 13.97, p < .001, adj. R2 = 0.25)
The effect of treat × post is statistically non-significant and negative (beta = -0.04, 95% CI [-0.17, 0.10], t(1279) = -0.56, p = 0.576; Std. beta = -0.01, 95% CI [-0.06, 0.03])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on racial and ethnic minority status-related social vulnerability and economic outcomes.
write_model_outcomes(m4_lihtc_div, "LIHTC", "housing and transportation access")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_HOUSETRANSPT with treat, post and cbsa (formula: SVI_FLAG_COUNT_HOUSETRANSPT ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and moderate proportion of variance (R2 = 0.22, F(34, 1279) = 10.61, p < .001, adj. R2 = 0.20)
The effect of treat × post is statistically non-significant and negative (beta = -0.05, 95% CI [-0.37, 0.26], t(1279) = -0.34, p = 0.737; Std. beta = -8.29e-03, 95% CI [-0.06, 0.04])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on housing and transportation access-related social vulnerability and economic outcomes.
write_model_outcomes(m5_lihtc_div, "LIHTC", "socioeconomic, household characteristics, racial and ethnic minority status, and housing and transportation access")
We fitted a linear model (estimated using OLS) to predict SVI_FLAG_COUNT_OVERALL with treat, post and cbsa (formula: SVI_FLAG_COUNT_OVERALL ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and moderate proportion of variance (R2 = 0.24, F(34, 1279) = 11.64, p < .001, adj. R2 = 0.22)
The effect of treat × post is statistically non-significant and positive (beta = 0.21, 95% CI [-0.56, 0.97], t(1279) = 0.53, p = 0.598; Std. beta = 0.01, 95% CI [-0.04, 0.06])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on socioeconomic, household characteristics, racial and ethnic minority status, and housing and transportation access-related social vulnerability and economic outcomes.
write_model_outcomes(m6_lihtc_div, "LIHTC", "Median Income")
We fitted a linear model (estimated using OLS) to predict MEDIAN_INCOME with treat, post and cbsa (formula: MEDIAN_INCOME ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and moderate proportion of variance (R2 = 0.21, F(34, 1277) = 9.94, p < .001, adj. R2 = 0.19)
The effect of treat × post is statistically non-significant and positive (beta = 2.53e-03, 95% CI [-0.11, 0.12], t(1277) = 0.04, p = 0.965; Std. beta = 1.09e-03, 95% CI [-0.05, 0.05])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on Median Income-related social vulnerability and economic outcomes.
write_model_outcomes(m7_lihtc_div, "LIHTC", "Median Home Value")
We fitted a linear model (estimated using OLS) to predict MEDIAN_HOME_VALUE with treat, post and cbsa (formula: MEDIAN_HOME_VALUE ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and substantial proportion of variance (R2 = 0.70, F(33, 1118) = 78.30, p < .001, adj. R2 = 0.69)
The effect of treat × post is statistically non-significant and positive (beta = 0.12, 95% CI [-0.07, 0.30], t(1118) = 1.22, p = 0.223; Std. beta = 0.02, 95% CI [-0.01, 0.05])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on Median Home Value-related social vulnerability and economic outcomes.
write_model_outcomes(m8_lihtc_div, "LIHTC", "House Price Index")
We fitted a linear model (estimated using OLS) to predict HOUSE_PRICE_INDEX with treat, post and cbsa (formula: HOUSE_PRICE_INDEX ~ treat + post + treat * post + cbsa) where treat represents LIHTC program participation, post is the year of 2020 after starting period of 2010, and cbsa controls for metro-level effects.
The model explains a statistically significant and moderate proportion of variance (R2 = 0.26, F(17, 136) = 2.74, p < .001, adj. R2 = 0.16)
The effect of treat × post is statistically non-significant and negative (beta = -3.72e-03, 95% CI [-0.38, 0.37], t(136) = -0.02, p = 0.984; Std. beta = -1.46e-03, 95% CI [-0.15, 0.15])
Since the effect of treat x post is not statistically significant, we cannot conclude that the LIHTC program had a measurable impact on House Price Index-related social vulnerability and economic outcomes.
For the discussion section of the lab, you will want to reiterate your findings from Lab 03 infographics on trends of areas of vulnerability, Lab 04 correlation analyses on the relationship between vulnerability and funding from the tax credit programs, and outcomes of your models from Lab 06 (and above).
In addition, provide recommendations of how stakeholders can best utilize the results of your analysis (did you find any interesting trends? were the programs effective? if not, does it seem the funding is going where it’s most needed? any other results you’d like to discuss? are there future studies that you believe would benefit your division?)
This section should be 2-5 paragraphs.
Finally, you will want to create a references list including all the packages we used throughout the project and any readings that you found to be helpful:
For the package citations we will use the report
package once again by loading all the packages we used throughout the course into our session and then generating a report. You can view documentation on this function here:
To complete this step, load all libraries and then use report to create citation from session info. Similar to the model reports, copy and paste the code chunk output from above and ensure that you hide the code chunk and output from the final report using echo=FALSE and eval=FALSE
# Load packages
library(renv) # R environment management
library(devtools) # R developer tools
library(here) # relative filepaths for reproducibility
library(tidyverse) # data wrangling
library(stringi) # string wrangling
library(kableExtra) # table formatting
library(tidycensus) # census data
library(ggplot2) # data visualization
library(patchwork) # data visualization layout
library(magick) # image editing in R
library(ggiraph) # interactive data visualization
library(htmlwidgets) # create widget from interactive visualizations
library(htmltools) # encode HTML code in map tooltips
library(widgetframe) # save widget of interactive visualizations
library(showtext) # utilize special fonts in graphs
library(scales) # format numbers and colors for graphs
library(tigris) # pull US Census shapefiles
library(cowplot) # data visualization plotting
library(gridExtra) # grid for data visualizations
library(biscale) # bivariate mapping
library(cluster) # clustering algorithms
library(factoextra) # clustering algorithms & visualization
library(rio) # read excel file from URL
library(unhcrthemes) # data visualization themes
library(ggrepel) # data visualization formatting to avoid overlapping
library(rcompanion) # data visualization of variable distribution
library(ggpubr) # data visualization of variable distribution
library(moments) # measures of skewness and kurtosis
library(tinytable) # format regression tables
library(modelsummary) # format regression tables
library(report) # package for statistical report writing and citations
Find R and system details:
session <- sessionInfo()
report_system(session)
Analyses were conducted using the R Statistical language (version 4.3.2; R Core
Team, 2023) on Windows 10 x64 (build 19045)
Cite Packages:
cite_packages(session, include_R = TRUE)
- Arel-Bundock V (2022). "modelsummary: Data and Model Summaries in R." _Journal of Statistical Software_, *103*(1), 1-23. doi:10.18637/jss.v103.i01 <https://doi.org/10.18637/jss.v103.i01>.
- Arel-Bundock V (2024). _tinytable: Simple and Configurable Tables in 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', 'PDF', and 'Typst' Formats_. R package version 0.2.1, <https://vincentarelbundock.github.io/tinytable/>.
- Auguie B (2017). _gridExtra: Miscellaneous Functions for "Grid" Graphics_. R package version 2.3.
- Chan C, Leeper T, Becker J, Schoch D (2023). _rio: A Swiss-army knife for data file I/O_. <https://cran.r-project.org/package=rio>.
- Cheng J, Sievert C, Schloerke B, Chang W, Xie Y, Allen J (2023). _htmltools: Tools for HTML_. R package version 0.5.7, https://rstudio.github.io/htmltools/, <https://github.com/rstudio/htmltools>.
- Gagolewski M (2022). "stringi: Fast and portable character string processing in R." _Journal of Statistical Software_, *103*(2), 1-59. doi:10.18637/jss.v103.i02 <https://doi.org/10.18637/jss.v103.i02>.
- Gohel D, Skintzos P (2024). _ggiraph: Make 'ggplot2' Graphics Interactive_. R package version 0.8.9, <https://davidgohel.github.io/ggiraph/>.
- Grolemund G, Wickham H (2011). "Dates and Times Made Easy with lubridate." _Journal of Statistical Software_, *40*(3), 1-25. <https://www.jstatsoft.org/v40/i03/>.
- Karambelkar B (2017). _widgetframe: 'Htmlwidgets' in Responsive 'iframes'_. R package version 0.3.1, https://bhaskarvk.github.io/widgetframe/, <https://github.com/bhaskarvk/widgetframe>.
- Kassambara A (2023). _ggpubr: 'ggplot2' Based Publication Ready Plots_. R package version 0.6.0, <https://rpkgs.datanovia.com/ggpubr/>.
- Kassambara A, Mundt F (2020). _factoextra: Extract and Visualize the Results of Multivariate Data Analyses_. R package version 1.0.7, <http://www.sthda.com/english/rpkgs/factoextra>.
- Komsta L, Novomestky F (2022). _moments: Moments, Cumulants, Skewness, Kurtosis and Related Tests_. R package version 0.14.1, http://www.komsta.net/, <https://www.r-project.org>.
- Maechler M, Rousseeuw P, Struyf A, Hubert M, Hornik K (2022). _cluster: Cluster Analysis Basics and Extensions_. R package version 2.1.4 - For new features, see the 'Changelog' file (in the package source), <https://CRAN.R-project.org/package=cluster>.
- Makowski D, Lüdecke D, Patil I, Thériault R, Ben-Shachar M, Wiernik B (2023). "Automated Results Reporting as a Practical Tool to Improve Reproducibility and Methodological Best Practices Adoption." _CRAN_. <https://easystats.github.io/report/>.
- Mangiafico SS (2024). _rcompanion: Functions to Support Extension Education Program Evaluation_. Rutgers Cooperative Extension, New Brunswick, New Jersey. version 2.4.35, <https://CRAN.R-project.org/package=rcompanion/>.
- Müller K (2020). _here: A Simpler Way to Find Your Files_. R package version 1.0.1, https://github.com/r-lib/here, <https://here.r-lib.org/>.
- Müller K, Wickham H (2023). _tibble: Simple Data Frames_. R package version 3.2.1, https://github.com/tidyverse/tibble, <https://tibble.tidyverse.org/>.
- Ooms J (2024). _magick: Advanced Graphics and Image-Processing in R_. R package version 2.8.3, <https://docs.ropensci.org/magick/https://ropensci.r-universe.dev/magick>.
- Pedersen T (2024). _patchwork: The Composer of Plots_. R package version 1.2.0, https://github.com/thomasp85/patchwork, <https://patchwork.data-imaginist.com>.
- Prener C, Grossenbacher T, Zehr A (2022). _biscale: Tools and Palettes for Bivariate Thematic Mapping_. R package version 1.0.0, <https://chris-prener.github.io/biscale/>.
- Qiu Y, details. aotifSfAf (2020). _showtextdb: Font Files for the 'showtext' Package_. R package version 3.0.
- Qiu Y, details. aotifSfAf (2022). _sysfonts: Loading Fonts into R_. R package version 0.8.8, <https://github.com/yixuan/sysfonts>.
- Qiu Y, details. aotisSfAf (2024). _showtext: Using Fonts More Easily in R Graphs_. R package version 0.9-7, <https://github.com/yixuan/showtext>.
- R Core Team (2023). _R: A Language and Environment for Statistical Computing_. R Foundation for Statistical Computing, Vienna, Austria. <https://www.R-project.org/>.
- Slowikowski K (2024). _ggrepel: Automatically Position Non-Overlapping Text Labels with 'ggplot2'_. R package version 0.9.5, https://github.com/slowkow/ggrepel, <https://ggrepel.slowkow.com/>.
- Ushey K, Wickham H (2024). _renv: Project Environments_. R package version 1.0.5, <https://CRAN.R-project.org/package=renv>.
- Vaidyanathan R, Xie Y, Allaire J, Cheng J, Sievert C, Russell K (2023). _htmlwidgets: HTML Widgets for R_. R package version 1.6.4, <https://github.com/ramnathv/htmlwidgets>.
- Vidonne C, Dicko A (2023). _unhcrthemes: UNHCR 'ggplot2' Theme and Colour Palettes_. R package version 0.6.2, https://unhcr-dataviz.github.io/unhcrthemes/, <https://github.com/unhcr-dataviz/unhcrthemes>.
- Walker K (2024). _tigris: Load Census TIGER/Line Shapefiles_. R package version 2.1, <https://github.com/walkerke/tigris>.
- Walker K, Herman M (2024). _tidycensus: Load US Census Boundary and Attribute Data as 'tidyverse' and 'sf'-Ready Data Frames_. R package version 1.6, <https://walker-data.com/tidycensus/>.
- Wickham H (2016). _ggplot2: Elegant Graphics for Data Analysis_. Springer-Verlag New York. ISBN 978-3-319-24277-4, <https://ggplot2.tidyverse.org>.
- Wickham H (2023). _forcats: Tools for Working with Categorical Variables (Factors)_. R package version 1.0.0, https://github.com/tidyverse/forcats, <https://forcats.tidyverse.org/>.
- Wickham H (2023). _stringr: Simple, Consistent Wrappers for Common String Operations_. R package version 1.5.1, https://github.com/tidyverse/stringr, <https://stringr.tidyverse.org>.
- Wickham H, Averick M, Bryan J, Chang W, McGowan LD, François R, Grolemund G, Hayes A, Henry L, Hester J, Kuhn M, Pedersen TL, Miller E, Bache SM, Müller K, Ooms J, Robinson D, Seidel DP, Spinu V, Takahashi K, Vaughan D, Wilke C, Woo K, Yutani H (2019). "Welcome to the tidyverse." _Journal of Open Source Software_, *4*(43), 1686. doi:10.21105/joss.01686 <https://doi.org/10.21105/joss.01686>.
- Wickham H, Bryan J, Barrett M, Teucher A (2023). _usethis: Automate Package and Project Setup_. R package version 2.2.2, https://github.com/r-lib/usethis, <https://usethis.r-lib.org>.
- Wickham H, François R, Henry L, Müller K, Vaughan D (2023). _dplyr: A Grammar of Data Manipulation_. R package version 1.1.4, https://github.com/tidyverse/dplyr, <https://dplyr.tidyverse.org>.
- Wickham H, Henry L (2023). _purrr: Functional Programming Tools_. R package version 1.0.2, https://github.com/tidyverse/purrr, <https://purrr.tidyverse.org/>.
- Wickham H, Hester J, Bryan J (2024). _readr: Read Rectangular Text Data_. R package version 2.1.5, https://github.com/tidyverse/readr, <https://readr.tidyverse.org>.
- Wickham H, Hester J, Chang W, Bryan J (2022). _devtools: Tools to Make Developing R Packages Easier_. R package version 2.4.5, https://github.com/r-lib/devtools, <https://devtools.r-lib.org/>.
- Wickham H, Pedersen T, Seidel D (2023). _scales: Scale Functions for Visualization_. R package version 1.3.0, https://github.com/r-lib/scales, <https://scales.r-lib.org>.
- Wickham H, Vaughan D, Girlich M (2024). _tidyr: Tidy Messy Data_. R package version 1.3.1, https://github.com/tidyverse/tidyr, <https://tidyr.tidyverse.org>.
- Wilke C (2024). _cowplot: Streamlined Plot Theme and Plot Annotations for 'ggplot2'_. R package version 1.1.3, <https://wilkelab.org/cowplot/>.
- Zhu H (2024). _kableExtra: Construct Complex Table with 'kable' and Pipe Syntax_. R package version 1.4.0, https://github.com/haozhu233/kableExtra, <http://haozhu233.github.io/kableExtra/>.
Ensure that you include the following citations for the data sets we utilized (feel free to re-format to match your preferred citation style):
- CDFI Fund (2023). _FY 2023 NMTC Public Data Release: 2003-2021 Data File Updated - Aug 21, 2023_. https://www.cdfifund.gov/documents/data-releases
- Centers for Disease Control and Prevention/ Agency for Toxic Substances and Disease Registry/ Geospatial Research, Analysis, and Services Program. (2022). _CDC/ATSDR Social Vulnerability Index 2020 Methodology_. https://www.atsdr.cdc.gov/placeandhealth/svi/data_documentation_download.html
- FHFA (n.d.). _HPI® Census Tracts (Developmental Index; Not Seasonally Adjusted)_. https://www.fhfa.gov/DataTools/Downloads/Pages/House-Price-Index-Datasets.aspx#atvol
- HUD User (n.d.). _2010, 2011, and 2012 QCT data for all of the census tracts in the United States and Puerto Rico (qct_data_2010_2011_2012.xlsx)_. https://www.huduser.gov/portal/datasets/qct.html#year2010
- HUD User (2023). _Low-Income Housing Tax Credit (LIHTC): Property Level Data_. https://www.huduser.gov/portal/datasets/lihtc/property.html
- Novogradac New Markets Tax Credit Resource Center. (2017). _New Markets Tax Credit Low-Income Community Census Tracts - American Community Survey 2011-2015_. https://www.novoco.com/resource-centers/new-markets-tax-credits/data-tables
- Steven Manson, Jonathan Schroeder, David Van Riper, Katherine Knowles, Tracy Kugler, Finn Roberts, and Steven Ruggles. _IPUMS National Historical Geographic Information System: Version 18.0 [2020 → 2010 Block Groups → Census Tracts Crosswalks National File]_. Minneapolis, MN: IPUMS. 2023. http://doi.org/10.18128/D050.V18.0
- U.S. Bureau of Labor Statistics (n.d.). _CPI Inflation Calculator_. https://data.bls.gov/cgi-bin/cpicalc.pl
- U.S. Bureau of Labor Statistics (n.d.). _QCEW County-MSA-CSA Crosswalk (For NAICS-Based Data)_. https://www.bls.gov/cew/classifications/areas/county-msa-csa-crosswalk.htm
- U.S. Census Bureau. (2011). _2006-2010 American Community Survey 5-year_. https://www.census.gov/newsroom/releases/archives/american_community_survey_acs/cb11-208.html
- U.S. Census Bureau. (2013). _2008-2012 American Community Survey 5-year_. https://www.census.gov/newsroom/press-kits/2013/20131217_acs_5yr.html
- U.S. Census Bureau. (2022). _2016-2020 American Community Survey 5-year_. https://www.census.gov/newsroom/press-releases/2022/acs-5-year-estimates.html
You can use any citation format of choice to cite your readings/learning materials from the course that are relevant to your final report. See the ‘References’ section of the Final Project Guide under Website Pages for more details: https://r-class.github.io/cpp-528-example-repo/Final-Project-Guide.html#website-pages
Once you have completed your report for Lab 06, I strongly encourage you to begin collaborating with your teammates to summarize your individual findings into an overall Executive Summary and Results and Conclusion section that synthesizes your discoveries across your respective divisions.
Review the Executive Summary page on the demo website: https://watts-college.github.io/paf-515-example-website/index
You should also begin working on building your Final Project Website (see Lab 07: https://r-class.github.io/paf-515-course-materials/labs/wk07/lab-07-middle-atlantic-division.html) and ensuring that all Kanban Board task items from Lab 01 are complete: https://r-class.github.io/paf-515-course-materials/labs/wk01/lab-01-middle-atlantic-division.html#kanban-boards-in-github
Congratulations! You’ve reached the end of the Lab-06 Tutorial!
You are now ready to complete your lab and submit it on Canvas.
Your import step in your .RMD file should look similar to the code chunk below, but your project_data_steps.R file should have your name/initials on the end (i.e. project_data_steps_CS.R).
::here( "fips_census_regions",
import"load_svi_data",
"merge_svi_data",
"census_division",
"write_model_outcomes"
# notice the use of here::here() that points to the .R file
# where all these R objects are created
.from = here::here("analysis/project_data_steps.R"),
.character_only = TRUE)
The following checklist will ensure that you’re on track: