-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.qmd
108 lines (80 loc) · 2.56 KB
/
report.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
title: "Baltimore City FY25-30 Capital Improvement Program"
author: "Baltimore City Department of Planning"
date: last-modified
papersize: letter
format:
dopPDF-pdf:
toc-depth: 2
keep-tex: true
params:
cip_type: "recommendation"
stage: "Ordinance"
title_short: "FY25-30 CIP Report"
---
```{r}
targets::tar_source(
files = here::here("R")
)
options(
fy_cols = paste0("fy", 2025:2030),
tbl_fy_cols = c(paste0("fy_", c(2025:2030)), "fy_total"),
tbl_fy_labels = c(paste0("FY", c(25:30)), "Total ($K)")
)
report_references <- tar_read(report_references)
agency_reference <- report_references[["agency_reference"]]
cip_project_details <- tar_read(cip_project_details)
report_data <- tar_read(cip_report_data)
cip_recommendations <- tar_read(cip_program_report_stage)
```
```{r}
curr_report_stage_reference <- tar_read(curr_report_stage_reference)
cip_term <- curr_report_stage_reference[["term"]]
cip_singular <- cip_term
cip_plural <- paste0(cip_term, "s")
cip_singular_title <- str_to_title(cip_singular)
cip_plural_title <- str_to_title(cip_plural)
cip_data_col <- paste0(cip_singular, "_data")
cip_verb <- curr_report_stage_reference[["verb"]]
report_org_name <- curr_report_stage_reference[["org_name"]]
# FIXME: See if a long org name should be added to the reference
report_org_name_long <- curr_report_stage_reference[["org_name"]]
report_org_abb <- curr_report_stage_reference[["org_abb"]]
recommendation_date <- format(lubridate::ymd(curr_report_stage_reference[["stage_date"]]), "%B %Y")
stage_filename <- curr_report_stage_reference[["filename"]]
```
```{r}
#| eval: false
# Enable this chunk to test
sample_n <- 15
report_data <- report_data |>
slice_sample(n = sample_n)
```
{{< pagebreak >}}
# Introduction
{{< include report/_intro_summary.qmd >}}
{{< include report/_intro_about-cip.qmd >}}
{{< include report/_intro_about-cip-report.qmd >}}
{{< pagebreak >}}
# `r curr_report_stage_reference[["report_section_title"]]`
```{r}
#| output: asis
report_data |>
nest_by(agency_label, .keep = TRUE) |>
# Create and show each agency report
knit_children(
agency_label,
data,
.input = here("report", "children", "_agency_report.qmd"),
.params = list2(
agency_reference = agency_reference,
curr_report_stage_reference = curr_report_stage_reference,
agency_level = 2
)
)
```
# Appendices
<!-- {{< include report/_appendix_recommendations.qmd >}} -->
<!-- {{< include report/_appendix_project-identifier.qmd >}} -->
{{< include report/_appendix_report-creation.qmd >}}
{{< include report/_appendix_updates.qmd >}}