Skip to main content

Background

The job centre journey time application presents the results of an experimental jobcentre journey time model. It provides an overview of planned changes (at a specific point in time) to the jobcentre estate in England and allows exploration of the estimated impact that these changes may have on the time it takes for people to travel to their nearest jobcentre when using public transport.

The application was developed using the open source programming language R and specifically through the use of the R package called Shiny. Further information about how to develop Shiny applications within R can be found at: https://shiny.rstudio.com/.

Outline of application functionality

As with most Shiny-based applications, the application comprises two key files: a server file and a user interface (UI) file.

The UI file governs the look and feel of the app as rendered on the internet.  It provides users with two filter options as selectInputs that allows the user to select a region of England and one of five model run outputs. The default selection is:

  • East of England &
  • Travel times before announcements (baseline)

The server file loads the datasets that underpin the application and then takes the inputs from the two filters and returns a set of responses to be rendered in by the UI:

  • In the Interactive Map tab:
    • An interactive map, built around the leaflet package within R, rendering a set of polygons and points specific to the region and model run output that has been chosen from within the UI. Functions, entitled datasetinput and datasetinput_2, within the server file interpret the user selections from within the UI and pass the appropriate datasets to the leaflet mapping function.
      • The colour rendering for the polygon data is differentiated between absolute journey times in a blue ramp and impact on journey times resulting from DWP’s proposed closures in a red ramp.
      • The points for job centres are rendered based on a value in their data table that represents whether the centre is classed as open, closed, a new proposed site or a site which was to be relocated locally.
    • The legend is held as two different png graphics.  The choice of which is rendered is controlled through a function within the server file entitled LegendRender.
  •  In the Claimant data tab:
    • A bar chart showing the estimated journey times under each scenario (controlled through functions within the server file entitled Jobcentre_chartA and Jobcentre_chartB.
    • A pie chart showing the travel time impact on claimants (controlled through a function within the server file entitled ImpactPie.

Additionally, a conditionalPanel is used within the UI file so that the impact pie chart will only render if impact scenarios are selected by the user

Datasets

The datasets used in the application consist largely of a series of spatial polygon data frames, providing the geographical outlines of output areas within each region along with their respective travel time banding. These bands indicate the estimated amount of time it would take people living in those areas to travel to their nearest job centre using public transport and were made available to us by the Department for Transport.

Separate spatial datasets are held within the application for each region and each model run output and are controlled through the UI selections and server based functions described previous.

Additionally, smaller tabular datasets are loaded into the application in order to provide the locations and statuses of individual job centres (rendered as points within the map) and to provide the aggregate journey time and impact distributions displayed within the application’s bar and pie charts.

DownloadJobcentre journey time application code