r paste0(API_CHUNK)
r Standards_details$Details[Standards_details$Standard == API_CHUNK]
API_TASKS <- perf_status_api_temp %>% dplyr::filter(Standard == API_CHUNK) %>% dplyr::pull(TaskVolume) API_PERF <- perf_status_api_temp %>% dplyr::filter(Standard == API_CHUNK) %>% dplyr::pull(Performance) API_SUMPERF3M <- perf_status_api_temp %>% dplyr::filter(Standard == API_CHUNK) %>% dplyr::pull(SumPerf3m)
For r format(data.period, "%B-%Y")
, r SHORT.NAME
had:
r scales::comma(API_TASKS)
r dplyr::if_else(API_CHUNK == "GIS Issues", "meters", "premises")
. r API_CHUNK
r dplyr::if_else(!is.na(API_PERF), paste0("performance is at ", scales::percent(API_PERF)), "")
Below is a graph showing r SHORT.NAME
's historical performance against r API_CHUNK
. MOSL action points and Rectification milestones are shown, if applicable.
on_plan <- perf_status_api_temp %>% dplyr::filter(Standard == API_CHUNK) %>% dplyr::pull(Rectification) graph <- perf_status_api %>% dplyr::filter(TaskVolume > 0) %>% MOSLR::plot_perf_graph( df = ., load.data = FALSE, standard = API_CHUNK, trading.party = TRADING.PARTY, period.start = data.period %m-% months(11), period.end = data.period, action.points = TRUE, include.iprp = on_plan, graph.title = API_CHUNK, sub.title = Standards_details$Context[Standards_details$Standard == API_CHUNK], fill.label = dplyr::if_else(API_CHUNK == "GIS Issues", "Meters", "Premises") ) + ggplot2::theme(text = ggplot2::element_text(size = 15)) tryCatch( expr = { plot(graph) }, error = function(e){ print(e) } )
r if (on_plan) { paste0(API_CHUNK, " is currently on a Rectification plan. See below for further details.") }
RATIONALE_CHUNK <- perf_status_api %>% dplyr::filter( Period >= data.period %m-% months(6), Trading.Party.ID == TRADING.PARTY, Standard == API_CHUNK, Action != "" ) %>% nrow() > 0 PFM_COMM_CHUNK <- perf_status_api %>% dplyr::filter( Period >= data.period %m-% months(6), Trading.Party.ID == TRADING.PARTY, Standard == API_CHUNK, !is.na(PFM_Commentary), PFM_Commentary != "" ) %>% nrow() > 0
r if (RATIONALE_CHUNK) { paste0("The table below shows the rationale for MOSL actions regarding ", paste0(API_CHUNK), ".") }
``` {r message = FALSE, echo = FALSE, error = FALSE, warning = FALSE, results = "asis", eval = RATIONALE_CHUNK}
comment_date <- perf_status_api_temp %>% dplyr::filter(Standard == API_CHUNK) %>% dplyr::mutate( check = any(OnWatch, Rectification, PerfFlag3m, UnderReview), date = dplyr::if_else(check, as.Date("2018-04-01"), as.Date(data.period %m-% months(6))) ) %>% dplyr::pull(date)
perf_status_api %>% dplyr::filter( Period >= comment_date, Trading.Party.ID == TRADING.PARTY, Standard == API_CHUNK, Action != "" ) %>% dplyr::select(Period, Action, Rationale) %>% dplyr::mutate(Period = format(as.Date(Period), "%Y-%m")) %>% kableExtra::kable( format = "latex", caption = paste0("Rationale for Recent MOSL Actions for ", API_CHUNK), linesep = "", #longtable = TRUE, booktabs = TRUE, col.names = c("Period", "Action", "Rationale") ) %>% kableExtra::column_spec(3, width = "10cm") %>% kableExtra::kable_styling( font_size = 10, latex_options = c( "repeat_header", "HOLD_position", full_width = FALSE, "striped" ) ) %>% kableExtra::row_spec(0, bold = TRUE)
<br> `r if (PFM_COMM_CHUNK) { paste0("The table below shows MOSL commentary regarding ", paste0(API_CHUNK), ".") }` ``` {r message = FALSE, echo = FALSE, error = TRUE, warning = FALSE, results = "asis", eval = PFM_COMM_CHUNK} perf_status_api %>% dplyr::filter( Period >= comment_date, Trading.Party.ID == TRADING.PARTY, Standard == API_CHUNK, !is.na(PFM_Commentary), PFM_Commentary != "" ) %>% dplyr::select(Period, PFM_Commentary) %>% dplyr::mutate(Period = format(as.Date(Period), "%Y-%m")) %>% kableExtra::kable( format = "latex", caption = paste0("MOSL Commentary for ", API_CHUNK), linesep = "", #longtable = TRUE, booktabs = TRUE, col.names = c("Period", "Commentary") ) %>% kableExtra::column_spec(2, width = "12cm") %>% kableExtra::kable_styling( font_size = 10, latex_options = c( "repeat_header", "HOLD_position", "striped" ) ) %>% kableExtra::row_spec(0, bold = TRUE)
r if (on_plan) { paste0("A summary of ", SHORT.NAME, "'s performance against its Rectification plan is shown in the table below.") }
``` {r message = FALSE, echo = FALSE, error = TRUE, warning = FALSE, results = "asis", eval = on_plan}
table <- perf_status_api %>% dplyr::filter( Trading.Party.ID == TRADING.PARTY, Standard == API_CHUNK, ) %>% dplyr::mutate_if(is.numeric, scales::percent_format(accuracy = 1)) %>% dplyr::select(Period, Performance, Planned_Perf, DeltaQuant, Status) %>% tidyr::drop_na() %>% dplyr::mutate(Period = format(as.Date(Period), "%Y-%m"))
if (nrow(table) > 0) {
table %>% kableExtra::kable( format = "latex", caption = "Rectification Performance Tracking", linesep = "", #longtable = TRUE, booktabs = TRUE, col.names = c( "Period", "Actual Performance", "Planned Performance", "Relative Difference", "Rectification Status" ), align = rep("c", 5) ) %>% kableExtra::column_spec(1:5, width = "2.5cm") %>% kableExtra::kable_styling( font_size = 10, latex_options = c( "repeat_header", "HOLD_position", "striped" ) ) %>% kableExtra::row_spec(0, bold = TRUE)
}
```
r if (on_plan) { paste0("For this plan there have been:") }
r if (on_plan) { paste0("* ", perf_status_api_temp$CumResubmit[perf_status_api_temp$Standard == API_CHUNK], " resubmission(s)") }
r if (on_plan) { paste0("* ", sum(perf_status_api_temp$UnderReview[perf_status_api_temp$Standard == API_CHUNK]), " review(s)") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.