Adjust R chunk, header
This commit is contained in:
parent
1bda12695d
commit
41a2015cbc
16
report.Rmd
16
report.Rmd
@ -14,7 +14,11 @@ output:
|
||||
---
|
||||
|
||||
```{r setup, include=FALSE}
|
||||
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
|
||||
knitr::opts_chunk$set(
|
||||
echo = TRUE,
|
||||
message = FALSE,
|
||||
warning = FALSE
|
||||
)
|
||||
# Load necessary libraries
|
||||
library(tidyverse)
|
||||
library(lubridate)
|
||||
@ -188,11 +192,11 @@ The plot below visualizes the survey submission trends for the past 90 days. It
|
||||
|
||||
The data used for this plot is filtered to include only submissions made in the last 90 days, with the submission count for each date represented by both the line and the points on the graph. A smoothed trend line (dashed) has been added to help visualize the overall submission pattern over this period.
|
||||
|
||||
```{r plot-submission-trends-90d, echo=TRUE, message=FALSE}
|
||||
```{r plot-submission-trends-90d, echo=TRUE, message=FALSE, fig.height=6, fig.width=8}
|
||||
plot_submission_trends(survey_data, days_ago = 90)
|
||||
```
|
||||
|
||||
### Response Rates to Top-Level Optional Questions
|
||||
### Optional Question Response Rates
|
||||
The table below summarizes the response rates for optional key top-level questions in the survey. These are the questions that all participants are asked, with some triggering additional follow-up questions based on responses. The response rate is the percentage of participants who provided an answer for each question.
|
||||
|
||||
The "Total Number of Species Planted" question has special handling—only responses greater than 0 are considered valid, whereas for other questions, any non-NA value counts as a response.
|
||||
@ -426,7 +430,7 @@ This map displays the **total number of trees planted** across each county in **
|
||||
|
||||
The map provides a visual overview of tree planting distribution across New York, making it easier to identify areas with the highest impact or need for further action.
|
||||
|
||||
```{r create-county-choropleth-map, echo=TRUE, message=FALSE}
|
||||
```{r create-county-choropleth-map, echo=TRUE, message=FALSE, fig.height=6, fig.width=8}
|
||||
library(tigris) # For geographic data
|
||||
library(sf) # For handling spatial data
|
||||
library(dplyr) # For data manipulation
|
||||
@ -457,6 +461,10 @@ ggplot(data = ny_counties_merged) +
|
||||
|
||||
```
|
||||
|
||||
```{r create-summary-table-county, echo=TRUE, message=FALSE}
|
||||
create_summary_table(survey_data, "County")
|
||||
```
|
||||
|
||||
## Tree Analysis {.tabset}
|
||||
```{r func-create_species_summary_table, echo=TRUE}
|
||||
create_species_summary_table <- function(data, field, field_label = NULL) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user