Last updated: 2026-03-11
Checks: 6 1
Knit directory: dickinson_power/
This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
The R Markdown is untracked by Git. To know which version of the R
Markdown file created these results, you’ll want to first commit it to
the Git repo. If you’re still working on the analysis, you can ignore
this warning. When you’re finished, you can run
wflow_publish to commit the R Markdown file and build the
HTML.
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(20260107) 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 cd016a6. 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: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/.DS_Store
Ignored: data/.DS_Store
Ignored: data/FY25 Main Meter Data.xlsx
Ignored: data/building_list_FY25_updated.xlsx
Ignored: data/graph_data_life_exp.csv
Ignored: data/housing_counts.csv
Ignored: keys/.DS_Store
Ignored: output/annual_kwh.csv
Ignored: output/building_check.csv
Ignored: output/building_check.xlsx
Ignored: output/daily_kwh.csv
Ignored: output/kwh_annual.csv
Ignored: output/kwh_annual_2026-03-04.csv
Ignored: output/kwh_annual_20260225.csv
Ignored: output/kwh_annual_20260226.csv
Ignored: output/kwh_daily.csv
Ignored: output/kwh_daily_2026-03-04.csv
Ignored: output/kwh_daily_20260225.csv
Ignored: output/kwh_daily_20260226.csv
Ignored: output/kwh_main_annual.csv
Ignored: output/kwh_main_daily.csv
Untracked files:
Untracked: analysis/PS05_prelim_results_Academic.Rmd
Untracked: analysis/PS05_prelim_results_Admin.Rmd
Untracked: analysis/PS05_prelim_results_Community.Rmd
Untracked: analysis/PS05_prelim_results_Other.Rmd
Untracked: analysis/PS05_prelim_results_Res_Hall_L.Rmd
Untracked: analysis/PS05_prelim_results_Res_Hall_M.Rmd
Untracked: analysis/PS05_prelim_results_Res_Hall_S.Rmd
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.
There are no past versions. Publish this analysis with
wflow_publish() to start tracking its development.
library(ggplot2)
library(tidyverse)
library(dplyr)
library(readr)
library(RColorBrewer)
library(rmarkdown)
library(DT)
library(lubridate)
kwh_annual <- read_csv("./output/kwh_annual_2026-03-04.csv")
kwh_daily <- read_csv("./output/kwh_daily_2026-03-04.csv")
# str(kwh_annual)
# str(kwh_daily)
Eva constructed the code for annual data elements including building category, transform, and organize.
annual_admin <- filter(kwh_annual, type == "Admin")
ghg_kg <- 0.30082405
cost <- 0.08138507
final_annual_admin <- annual_admin %>%
mutate(GHG.MT = round(kwh_corr*ghg_kg)/1000,
cost = round(kwh_corr*cost),
kwh_sqft = round(kwh/sqft))
final_annual_admin
final_annual_admin %>%
arrange(final_annual_admin, kwh_corr)
final_annual_admin$type <- NULL
str(final_annual_admin)
# summary(final_annual_admin)
Amiya conducted the analysis using code for the daily data of administrative buildings including filtering for administrative buildings and transforming the data to the necessary measurements.
Admin_subset <- kwh_daily %>%
filter(type == "Admin") %>%
mutate(
date = ymd(date),
month = month(date, label = TRUE, abbr = FALSE),
day_of_week = wday(date, label = TRUE, abbr = TRUE),
kwh_sqft_yr = round(kwh*365) / sqft)
Eva created the descriptive tables for the administrative buildings and created the stacked bar chart for electricity intensity by month. It is important to note for the stacked bar chart that there is data missing for all the buildings on the Weiss Meter, including Old West, for part of August, making Old West’s total kWh for the month much lower than reality. Amiya created the ranked boxplot for annual total kwh by administrative building using the EIA 2018 report measurements of spread.
datatable(final_annual_admin)
datatable(Admin_subset)
eia_median <- 10.1
eia_q25 <- 6.1
eia_q75 <- 15.7
ggplot(Admin_subset,aes(
x = reorder(NAME, kwh_sqft_yr, FUN = median, na.rm = TRUE),
y = kwh_sqft_yr,
fill = NAME
)) +
annotate("rect", ymin = eia_q25, ymax = eia_q75, xmin = -Inf, xmax = Inf,
alpha = 0.2, fill = "gray50") +
geom_hline(yintercept = eia_median, linetype = "dashed", color = "black", linewidth = 0.8) +
geom_boxplot(alpha = 0.9, outlier.alpha = 0.5) +
coord_flip() +
facet_wrap(~ period) +
labs(
title = "Annualized Daily Electricity Intensity by Building",
subtitle = "Dashed line = EIA 2018 Median; Gray band = EIA 2018 IQR",
x = NULL,
y = "Electricity Intensity (kWh/sqft/year)"
) +
theme_bw() +
theme(
legend.position = "none",
panel.spacing = unit(1, "lines")
)

ggplot(Admin_subset, aes(x = month, y = kwh, fill = NAME)) +
geom_col() +
theme_bw() +
theme(legend.title = element_blank()) +
labs(title = "Electricity Intensity by Month for Administrative Buildings",
x = "Month",
y = "Administrative Building Name/Address")

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.7.8
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] DT_0.33 rmarkdown_2.25 RColorBrewer_1.1-3 lubridate_1.9.3
[5] forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2
[9] readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 tidyverse_2.0.0
[13] ggplot2_3.5.1
loaded via a namespace (and not attached):
[1] sass_0.4.8 utf8_1.2.4 generics_0.1.3 stringi_1.8.3
[5] hms_1.1.3 digest_0.6.37 magrittr_2.0.3 evaluate_0.23
[9] grid_4.3.2 timechange_0.3.0 fastmap_1.1.1 rprojroot_2.0.4
[13] workflowr_1.7.1 jsonlite_1.8.8 promises_1.2.1 fansi_1.0.6
[17] crosstalk_1.2.1 scales_1.3.0 jquerylib_0.1.4 cli_3.6.2
[21] crayon_1.5.2 rlang_1.1.3 ellipsis_0.3.2 bit64_4.0.5
[25] munsell_0.5.0 withr_3.0.0 cachem_1.0.8 yaml_2.3.8
[29] parallel_4.3.2 tools_4.3.2 tzdb_0.4.0 colorspace_2.1-0
[33] httpuv_1.6.13 vctrs_0.6.5 R6_2.5.1 lifecycle_1.0.4
[37] git2r_0.33.0 bit_4.0.5 htmlwidgets_1.6.4 fs_1.6.3
[41] vroom_1.6.5 pkgconfig_2.0.3 pillar_1.9.0 bslib_0.6.1
[45] later_1.3.2 gtable_0.3.4 glue_1.7.0 Rcpp_1.1.0
[49] highr_0.10 xfun_0.41 tidyselect_1.2.0 rstudioapi_0.16.0
[53] knitr_1.45 farver_2.1.1 htmltools_0.5.7 labeling_0.4.3
[57] compiler_4.3.2