As of r format(data.period, "%B-%Y")
, MOSL were monitoring r SHORT.NAME
's performance against r nrow(perf_status_api_temp)
standards. The performance of Trading Parties against these standards is measured according to:
r paste(unique(perf_status_api_temp$PerformanceMeasure), collapse = " and ")
The current APIs are
\begin{enumerate} \item GIS Issues: The proportion of meters that have no verifiable issues with their GIS coordinates. The issues currently measured are: \begin{itemize} \item >20 meters stacked: Marked as an issue when 20 or more meters are marked to be in a $10cm\times 10cm$ area \item UPRN/Postocde centre: Marked as an issue when the GIS coordinates match exactly with the UPRN/Postcode centre coordinates \item Far from UPRN/Postcode centre: Marked as an issue when the GIS coordinates are more than 1km away from the UPRN/Postcode centre coordinates \end{itemize} \item UPRN Completeness: The proportion of premises that have a Unique Property Reference Number (UPRN) \item VOA Completeness: The proportion of premises that have a Valuation Office Agency (VOA) Billing Authority Reference Number \end{enumerate}
For more information on the data items mentioned, see $\color{blue}{\text{\bf here}}$
tryCatch( expr = { agg_perf <- api_aggregate_perf %>% dplyr::filter(Trading.Party.ID == TRADING.PARTY) %>% dplyr::select(Period, Agg_Perf_roll) %>% dplyr::rename(GroupPerf = Agg_Perf_roll) %>% dplyr::mutate(Group = "Aggregate Performance") api_data_clean_temp %>% dplyr::group_by(Period, Group) %>% dplyr::summarise( GroupPerf = sum(OnTimeTasks) / sum(TaskVolume) ) %>% dplyr::ungroup() %>% dplyr::group_by(Group) %>% dplyr::mutate( GroupPerf = zoo::rollapply(GroupPerf, 6, mean, align = "right", fill = NA) ) %>% dplyr::ungroup() %>% base::rbind(., agg_perf) %>% droplevels() %>% tidyr::drop_na() %>% ggplot2::ggplot() + ggplot2::geom_line( ggplot2::aes( x = Period, y = GroupPerf, colour = Group, linetype = Group ) ) + ggplot2::geom_point( ggplot2::aes( x = Period, y = GroupPerf, colour = Group, fill = Group, shape = Group ) ) + ggplot2::theme( legend.title = ggplot2::element_blank(), text = ggplot2::element_text(size = 15) ) + ggplot2::scale_y_continuous( labels = scales::percent_format(accuracy = 1), breaks = scales::pretty_breaks(4) ) + ggplot2::theme_bw() + ggplot2::scale_colour_manual( values = c("#425563", "#05C3DE", "#005F83", "#00A499", "#FFAA4D", "#F9E547", "#8866BC") ) + ggplot2::scale_fill_manual( values = c("#425563", "#05C3DE", "#005F83", "#00A499", "#FFAA4D", "#F9E547", "#8866BC") ) + ggplot2::labs( title = paste0("API Performance: ", SHORT.NAME), subtitle = "Breakdown by month and standard", caption = "Source: MOSL\nNote: Aggregate performance corresponds to the 6-month average of aggregate API performance" ) + ggplot2::ylab("") + ggplot2::xlab("") }, error = function(e){} )
tryCatch( expr = { api_data_clean_temp %>% dplyr::filter( Period >= max(api_data_clean_temp$Period) %m-% months(11) ) %>% dplyr::mutate( Performance = scales::percent(Performance, accuracy = 1), Period = format(Period, "%Y-%m") ) %>% dplyr::select( Period, Standard, Performance ) %>% tidyr::spread(key = Standard, value = Performance) %>% kableExtra::kable( format = "latex", caption = "API Performance by Month", linesep = "", format.args = list(big.mark = ","), booktabs = TRUE, align = "c" ) %>% kableExtra::kable_styling( font_size = 10, latex_options = c( "repeat_header", "HOLD_position", "striped", position = "center", full_width = FALSE, "scale_down" ) ) %>% kableExtra::row_spec(0, bold = TRUE) }, error = function(e){} )
r SHORT.NAME
's 6-month aggregate API performance is r scales::percent(api_aggregate_perf_temp$Agg_Perf_roll, accuracy = 1)
, which currently ranks as:
r scales::ordinal(api_aggregate_perf_temp$rank_all)
out of r api_aggregate_perf_temp$n_all
for all Trading Partiesr scales::ordinal(api_aggregate_perf_temp$rank_type)
out of r paste0(api_aggregate_perf_temp$n_type, " ", api_aggregate_perf_temp$tp_type)
sr scales::ordinal(api_aggregate_perf_temp$rank_league)
out of r paste(api_aggregate_perf_temp$n_league, api_aggregate_perf_temp$LeagueGroup)
tryCatch( expr = { api_aggregate_perf %>% dplyr::filter(Period == data.period) %>% ggplot2::ggplot() + ggplot2::geom_bar( ggplot2::aes( x = reorder(ShortName, -rank_league), y = Agg_Perf_roll, fill = dplyr::if_else(Trading.Party.ID == TRADING.PARTY, "highlight", "normal") ), stat = "identity", show.legend = FALSE ) + ggplot2::scale_y_continuous(labels = scales::percent_format(accuracy = 1)) + ggplot2::scale_fill_manual(values = c("#425563", "azure3")) + ggplot2::coord_flip() + ggplot2::theme_bw() + ggplot2::theme(text = ggplot2::element_text(size = 15)) + ggplot2::labs( title = "Peer Comparison Tables: Additional Performance Indicators", subtitle = "Six-month rolling aggregate performance", caption = "Source: MOSL", x = "", y = "" ) + ggplot2::facet_wrap(~LeagueGroup, scales = "free_y", ncol = 2) }, error = function(e){} )
``` {r message = FALSE, echo = FALSE, error = FALSE, warning = FALSE, results = "asis", eval=FALSE}
tryCatch( expr = { perf_status_api_temp %>% dplyr::select(Standard, SecondaryCategory, TaskVolume, Performance, Status, Action) %>% dplyr::mutate( Status = tidyr::replace_na(Status, ""), TaskVolume = scales::comma(TaskVolume, accuracy = 1), Performance = scales::percent(Performance, accuracy = 1) ) %>% kableExtra::kable( format = "latex", caption = "Current Status of API", linesep = "", booktabs = TRUE, col.names = c("API", "Category", "Task\nVolume", "Performance", "Rectification\nStatus", "MOSL\nAction") ) %>% kableExtra::kable_styling( latex_options = c( "repeat_header", "HOLD_position", "striped", position = "center", full_width = FALSE, "scale_down" ) ) %>% kableExtra::row_spec(0, bold = TRUE) }, error = function(e){} )
<!-- See Appendix for an explanation of how MOSL evaluates Trading Party performance against the standards. --> ```r tryCatch( expr = { perf_status_api_temp %>% ggplot2::ggplot() + ggrepel::geom_label_repel( ggplot2::aes( x = rolling.sd, y = rolling.mean, label = Standard, fill = Group ), alpha = 0.8, colour = "white" ) + ggplot2::scale_y_continuous(labels = scales::percent_format(accuracy = 1)) + ggplot2::scale_x_reverse(labels = scales::percent_format(accuracy = 1)) + ggplot2::theme_bw() + ggplot2::scale_fill_manual( values = c("#425563", "#05C3DE", "#005F83", "#00A499", "#FFAA4D", "#F9E547", "#8866BC") ) + ggplot2::theme( text = ggplot2::element_text(size = 15) ) + ggplot2::labs( title = paste0("API Performance and Consistency as of ", format(as.Date(data.period), '%B %Y')), subtitle = "Rolling 6-month mean and standard deviation of API performance", caption = "Source: MOSL" ) + ggplot2::ylab("Performance") + ggplot2::xlab("Consistency") }, error = function(e){} )
api_list <- unique(as.character(perf_status_api_temp$Standard)) res <- lapply(api_list, function (API_CHUNK) { knitr::knit_child( "pfm_report_api_template.Rmd", envir = environment(), quiet = TRUE ) } ) cat(unlist(res), sep = "\n")
\newpage
metrics.list <- c("MarketMean", "MarketTaskVolume") for (METRIC in metrics.list) { api_summary %>% dplyr::select( Period, Standard, METRIC ) %>% dplyr::filter( Period >= data.period %m-% months(11) ) %>% dplyr::mutate(Period = format(Period, "%Y-%m")) %>% tidyr::spread(Period, METRIC) %>% dplyr::mutate_if( is.numeric, ifelse( METRIC != "MarketTaskVolume", scales::percent_format(accuracy = 1), scales::number_format(big.mark = ",", accuracy = 1) ) ) %>% kableExtra::kable( format = "latex", caption = paste0("Market ", base::gsub("Market", x = METRIC, replacement = " ")), linesep = "", digits = 1, booktabs = TRUE, align = "c" ) %>% kableExtra::kable_styling( latex_options = c( "repeat_header", "HOLD_position", "striped", "scale_down" ) ) %>% kableExtra::row_spec(0, bold = TRUE) %>% print() cat("\n") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.