Skip to contents

Downloads (and caches) the OBR Welfare Trends Report charts and tables workbook and returns annual spending on each incapacity benefit as a share of GDP, from 1978-79 to 2028-29, from the October 2024 Welfare Trends Report (the OBR's most recent report on incapacity benefits).

Usage

get_incapacity_spending(refresh = FALSE)

Arguments

refresh

Logical. If TRUE, re-download even if a cached copy exists. Defaults to FALSE.

Value

An obr_tbl with the standard v0.4.0 schema. series is the benefit name, values are spending as a percentage of GDP, metric_type is "pct", unit is "pct". See get_public_finances() for full column docs.

Details

Series include: Invalidity Benefit, Incapacity Benefit, Employment and Support Allowance (ESA), Sickness Benefit, and Severe Disablement Allowance.

Examples

# \donttest{
op <- options(obr.cache_dir = tempdir())
try({
  ib <- get_incapacity_spending()
  unique(ib$series)
})
#> Waiting 2s for retry backoff ■■■■■■■■■■■■■■■                 
#> Waiting 2s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■                 
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  
#> Warning: Could not resolve a current Welfare Trends Report (October 2024) URL from 1
#> candidate.
#> ℹ Falling back to
#>   <https://obr.uk/download/welfare-trends-report-october-2024-charts-and-tables/>.
#> ! Returned data may be older than expected. Run with internet access, or pin a
#>   vintage explicitly when that feature ships.
#> ℹ Downloading
#>   welfare_trends_october_2024__welfare-trends-report-october-2024-charts-and-tables.xlsx
#>   from OBR...
#> Waiting 2s for retry backoff ■■■■■■■■■■■■■■■                 
#> Waiting 2s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■                  
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  
#> Error : Failed to download
#> <https://obr.uk/download/welfare-trends-report-october-2024-charts-and-tables/>.
#> ✖ HTTP 403 Forbidden.
options(op)
# }