| Title: | Download and Tidy 'HMRC' Statistical Data |
|---|---|
| Description: | Provides functions to download, parse, and tidy statistical data published by 'HM Revenue and Customs' ('HMRC') on 'GOV.UK'. Returns annotated 'hmrc_tbl' data frames with provenance metadata (source URL, fetch time, vintage, cell methods) for reproducible fiscal research. Covers monthly tax receipts (41 tax heads from 2008), 'VAT' (from 1973), fuel duties (from 1990), tobacco duties (from 1991), annual 'Corporation Tax' receipts, stamp duty, research and development tax credit statistics (from 2000), tax gap estimates, 'Income Tax' liabilities by income range, and monthly property transaction counts. File URLs are resolved at runtime via the 'GOV.UK' Content API <https://www.gov.uk/api/content>, so data is always current without hardcoded URLs. Files are cached locally between sessions. |
| Authors: | Charles Coverdale [aut, cre] |
| Maintainer: | Charles Coverdale <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.4.0 |
| Built: | 2026-06-04 06:24:11 UTC |
| Source: | https://github.com/charlescoverdale/hmrc |
A data frame describing every HMRC dataset known to the package, including
those exposed by an hmrc_* function and those on the development roadmap
(where function_name is NA). Use hmrc_search() for keyword search and
hmrc_publications() for a tidy index.
cataloguecatalogue
A data frame with columns:
Character. Short identifier.
Character. GOV.UK publication name.
Character. Exporting function (or NA).
Character. monthly, quarterly, annual, etc.
Character. First period of the published series.
Character. Usually "HMRC".
Character. GOV.UK statistics slug.
Character. URL of the publication landing page.
Character. One-line description.
Character. Space-separated keywords searched by
hmrc_search().
Returns a tidy table of files currently held in the package cache, with
size and age. Useful for understanding what is stored locally and deciding
when to clear stale files via hmrc_clear_cache().
hmrc_cache_info()hmrc_cache_info()
A data frame with columns file, extension, size_bytes,
size_mb, modified (POSIXct), age_days, path. The data frame is
empty (zero rows) if the cache directory does not exist or is empty.
The cache directory itself is attached as the attribute "cache_dir".
Other infrastructure:
hmrc_clear_cache(),
hmrc_list_tax_heads(),
hmrc_meta(),
hmrc_publications(),
hmrc_search()
op <- options(hmrc.cache_dir = tempdir()) info <- hmrc_cache_info() attr(info, "cache_dir") options(op)op <- options(hmrc.cache_dir = tempdir()) info <- hmrc_cache_info() attr(info, "cache_dir") options(op)
Downloads and tidies HMRC Table 1 of the Capital Gains Tax statistics bulletin: estimated number of CGT taxpayers, amounts of gains, and tax liabilities by year of disposal. Data runs from 1987-88 onwards and is published annually each summer.
hmrc_capital_gains(tax_year = NULL, measure = NULL, cache = TRUE)hmrc_capital_gains(tax_year = NULL, measure = NULL, cache = TRUE)
tax_year |
Character vector or |
measure |
Character vector or |
cache |
Logical. Use cached file if available (default |
Gains are after the deduction of taper relief and losses plus attributed gains, but before deduction of the Annual Exempt Amount. Trusts include personal representatives of the deceased. Statistics for the latest two tax years are provisional and are revised in subsequent publications as late returns arrive.
An hmrc_tbl (long format) with columns tax_year, measure,
value. Numbers of taxpayers are in thousands; amounts in millions
of pounds; percentages in percent. Suppressed cells return NA.
https://www.gov.uk/government/organisations/hm-revenue-customs/series/capital-gains-tax-statistics
Other data fetchers:
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_capital_gains() hmrc_capital_gains(measure = "tax_total_gbp_m") hmrc_capital_gains(tax_year = "2022-23") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_capital_gains() hmrc_capital_gains(measure = "tax_total_gbp_m") hmrc_capital_gains(tax_year = "2022-23") options(op)
Deletes locally cached data files downloaded by the package. By default
all cached files are removed; pass max_age_days to remove only files
older than that.
hmrc_clear_cache(max_age_days = NULL)hmrc_clear_cache(max_age_days = NULL)
max_age_days |
Numeric or |
Invisibly returns the number of files deleted.
Other infrastructure:
hmrc_cache_info(),
hmrc_list_tax_heads(),
hmrc_meta(),
hmrc_publications(),
hmrc_search()
op <- options(hmrc.cache_dir = tempdir()) hmrc_clear_cache() hmrc_clear_cache(max_age_days = 30) options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_clear_cache() hmrc_clear_cache(max_age_days = 30) options(op)
Downloads and tidies the HMRC Corporation Tax Statistics annual publication, reporting receipts broken down by tax type for the most recent six financial years. Published annually in September.
hmrc_corporation_tax(cache = TRUE)hmrc_corporation_tax(cache = TRUE)
cache |
Logical. Use cached file if available (default |
Some levies (e.g. Residential Property Developer Tax, Electricity
Generators Levy) were introduced mid-series and have NA values for
earlier years.
An hmrc_tbl with columns tax_year, type, description,
receipts_gbp_m.
https://www.gov.uk/government/collections/analyses-of-corporation-tax-receipts-and-liabilities
Other data fetchers:
hmrc_capital_gains(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_corporation_tax() options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_corporation_tax() options(op)
Downloads and tidies Table 1 (annual time series) of the HMRC Creative Industries Statistics for each of the eight creative-industries reliefs: Film, High-end TV, Animation, Children's TV, Video Games, Theatre, Orchestra, and Museums and Galleries Exhibition. Published annually each August.
hmrc_creative_industries(sector = NULL, tax_year = NULL, cache = TRUE)hmrc_creative_industries(sector = NULL, tax_year = NULL, cache = TRUE)
sector |
Character vector or |
tax_year |
Character vector or |
cache |
Logical. Use cached file if available (default |
Creative Industries reliefs are paid on an accruals basis. The latest
tax year in each sector's table is provisional and uplifted by HMRC for
claims not yet received; status is recorded in the status column.
Sector tables differ slightly in their column set (films track
productions, video games track productions, theatre tracks
claims/productions, museums track exhibitions, etc.); columns absent
from a sector's table are returned as NA.
An hmrc_tbl with columns:
Character. Creative-industries sector identifier.
Character. Tax year, e.g. "2023-24".
Numeric. Number of companies (where reported).
Numeric. Number of claims (where reported).
Numeric. Number of productions (films, games, etc., where reported).
Numeric. Amount of relief paid, GBP million.
Character. HMRC revision status (e.g. "Unchanged",
"Provisional").
https://www.gov.uk/government/collections/creative-industries-statistics
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_creative_industries(sector = "film") hmrc_creative_industries(tax_year = "2023-24") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_creative_industries(sector = "film") hmrc_creative_industries(tax_year = "2023-24") options(op)
Downloads and tidies the HMRC Hydrocarbon Oils Bulletin, which reports monthly fuel duty receipts. Data runs from January 1990 to the most recent published month, updated twice per year (January and July).
hmrc_fuel_duties(fuel = NULL, start = NULL, end = NULL, cache = TRUE)hmrc_fuel_duties(fuel = NULL, start = NULL, end = NULL, cache = TRUE)
fuel |
Character vector or |
start |
Character |
end |
Character |
cache |
Logical. Use cached file if available (default |
An hmrc_tbl with columns date, fuel, description,
receipts_gbp_m.
https://www.gov.uk/government/statistics/hydrocarbon-oils-bulletin
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_fuel_duties(fuel = "total", start = "2010-01") hmrc_fuel_duties() options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_fuel_duties(fuel = "total", start = "2010-01") hmrc_fuel_duties() options(op)
Downloads and tidies HMRC Table 2.5, which reports the number of Income Tax payers and their liabilities grouped by total income range, for each available tax year. Numbers of taxpayers are in thousands; amounts are in millions of pounds unless otherwise noted. Published annually in May/June.
hmrc_income_tax_stats(tax_year = NULL, cache = TRUE)hmrc_income_tax_stats(tax_year = NULL, cache = TRUE)
tax_year |
Character vector or |
cache |
Logical. Use cached file if available (default |
The earliest tax year with outturn data is based on the Survey of Personal
Incomes; later years are projected estimates. Values suppressed for small
sample sizes are returned as NA.
An hmrc_tbl with columns tax_year, income_range,
income_lower_gbp, taxpayers_thousands, total_income_gbp_m,
tax_liability_gbp_m, average_rate_pct, average_tax_gbp.
https://www.gov.uk/government/statistics/income-tax-liabilities-by-income-range
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_income_tax_stats() hmrc_income_tax_stats(tax_year = "2023-24") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_income_tax_stats() hmrc_income_tax_stats(tax_year = "2023-24") options(op)
Downloads and tidies HMRC Table 12.1a of the Inheritance Tax Liabilities Statistics: numbers of estates, tax due, average tax, and average effective tax rate, broken down by net-estate band, for the latest published year of death. Published annually in July, ~3 years after the year of death due to the administration window.
hmrc_inheritance_tax(cache = TRUE)hmrc_inheritance_tax(cache = TRUE)
cache |
Logical. Use cached file if available (default |
An hmrc_tbl (long format) with columns:
Character. Year of death, e.g. "2022-23".
Numeric. Lower limit of the net-estate band in pounds.
Character. Plain-English label, e.g.
"GBP 0-100k", "Total".
Character. One of "number_not_taxed",
"number_taxed", "tax_due_gbp_m", "avg_tax_gbp",
"effective_rate_pct".
Numeric. Value, with [z] (no tax due to NRB) and
[c] (disclosure suppression) returned as NA.
https://www.gov.uk/government/statistics/inheritance-tax-liabilities-statistics
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_inheritance_tax() options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_inheritance_tax() options(op)
Returns a data frame describing all tax and duty heads available in
hmrc_tax_receipts(). No network connection is required: the data is
bundled with the package.
hmrc_list_tax_heads()hmrc_list_tax_heads()
A data frame with columns:
Character. Identifier used in the tax argument of
hmrc_tax_receipts().
Character. Plain-English description.
Character. Broad grouping.
Character. Earliest year of monthly data.
Other infrastructure:
hmrc_cache_info(),
hmrc_clear_cache(),
hmrc_meta(),
hmrc_publications(),
hmrc_search()
hmrc_list_tax_heads()hmrc_list_tax_heads()
hmrc_tbl
Returns the provenance list attached to a result from any hmrc_* data
fetcher: source URL, fetch time, vintage, cell methods, and so on. Useful
for citation, audit trails, and reproducibility.
hmrc_meta(x)hmrc_meta(x)
x |
An object returned by an |
A named list, or NULL if x has no metadata.
Other infrastructure:
hmrc_cache_info(),
hmrc_clear_cache(),
hmrc_list_tax_heads(),
hmrc_publications(),
hmrc_search()
op <- options(hmrc.cache_dir = tempdir()) tr <- hmrc_tax_receipts(tax = "vat", start = "2024-01") hmrc_meta(tr) options(op)op <- options(hmrc.cache_dir = tempdir()) tr <- hmrc_tax_receipts(tax = "vat", start = "2024-01") hmrc_meta(tr) options(op)
Downloads and tidies Table 1 of the HMRC Patent Box Relief Statistics: annual number of companies electing into the Patent Box regime and the total relief claimed (in GBP million). The Patent Box was introduced from 1 April 2013; data runs from tax year 2013-14 to the most recent published year (typically with a one-year provisional lag). Published annually each September.
hmrc_patent_box(tax_year = NULL, cache = TRUE)hmrc_patent_box(tax_year = NULL, cache = TRUE)
tax_year |
Character vector or |
cache |
Logical. Use cached file if available (default |
An hmrc_tbl with columns:
Character. Tax year, e.g. "2023-24".
Numeric. Number of companies electing into the regime (rounded to nearest 5 by HMRC).
Numeric. Total relief in millions of pounds.
https://www.gov.uk/government/statistics/patent-box-reliefs-statistics
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_patent_box() hmrc_patent_box(tax_year = "2022-23") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_patent_box() hmrc_patent_box(tax_year = "2022-23") options(op)
Downloads and tidies the HMRC Monthly Property Transactions bulletin, which counts residential and non-residential property transactions (SDLT returns, LBTT in Scotland, LTT in Wales) for England, Scotland, Wales, Northern Ireland, and the UK total. Data runs from April 2005 to the most recent completed month.
hmrc_property_transactions( type = c("all", "residential", "non_residential"), nation = NULL, start = NULL, end = NULL, cache = TRUE )hmrc_property_transactions( type = c("all", "residential", "non_residential"), nation = NULL, start = NULL, end = NULL, cache = TRUE )
type |
Character. One of |
nation |
Character vector or |
start |
Character |
end |
Character |
cache |
Logical. Use cached file if available (default |
An hmrc_tbl with columns date, nation, type,
transactions.
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_property_transactions() hmrc_property_transactions(type = "residential", nation = "england", start = "2020-01") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_property_transactions() hmrc_property_transactions(type = "residential", nation = "england", start = "2020-01") options(op)
Tidy roster of HMRC publications, marking which are exposed via an
hmrc_* function and which are on the development roadmap. Useful for
planning analyses, citing the package, and tracking coverage over time.
hmrc_publications(status = c("all", "implemented", "planned"))hmrc_publications(status = c("all", "implemented", "planned"))
status |
One of |
A data frame with one row per publication and a status column
("implemented" or "planned").
Other infrastructure:
hmrc_cache_info(),
hmrc_clear_cache(),
hmrc_list_tax_heads(),
hmrc_meta(),
hmrc_search()
# Everything in the catalogue hmrc_publications() # Only roadmap items hmrc_publications("planned")# Everything in the catalogue hmrc_publications() # Only roadmap items hmrc_publications("planned")
Downloads and tidies the HMRC Research and Development Tax Credits Statistics publication, covering the SME R&D Relief and Research and Development Expenditure Credit (RDEC) schemes. Annual data runs from 2000-01 to the most recent financial year, published annually in September.
hmrc_rd_credits(scheme = NULL, measure = NULL, cache = TRUE)hmrc_rd_credits(scheme = NULL, measure = NULL, cache = TRUE)
scheme |
Character vector or |
measure |
Character vector or |
cache |
Logical. Use cached file if available (default |
Data before 2003-04 covers only the SME scheme (RDEC was introduced in 2002). Figures for the most recent two years are provisional and subject to revision as late claims are processed.
An hmrc_tbl with columns tax_year, scheme, description,
measure, value.
https://www.gov.uk/government/statistics/corporate-tax-research-and-development-tax-credit
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_rd_credits() hmrc_rd_credits(scheme = "sme", measure = "claims") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_rd_credits() hmrc_rd_credits(scheme = "sme", measure = "claims") options(op)
Fuzzy keyword search across publication name, description, tags, and dataset identifier. Returns a tidy table of matching rows so users can discover what the package exposes (and what is on the roadmap).
hmrc_search(query = NULL, implemented = NULL, frequency = NULL)hmrc_search(query = NULL, implemented = NULL, frequency = NULL)
query |
Character. Keyword or regex pattern. Case-insensitive.
Matches anywhere in |
implemented |
Logical or |
frequency |
Optional character vector to filter by frequency
(e.g. |
A data frame, sorted with implemented datasets first.
Other infrastructure:
hmrc_cache_info(),
hmrc_clear_cache(),
hmrc_list_tax_heads(),
hmrc_meta(),
hmrc_publications()
# Everything mentioning VAT hmrc_search("vat") # Only annual publications already implemented hmrc_search(implemented = TRUE, frequency = "annual") # Roadmap items mentioning capital gains hmrc_search("capital gains", implemented = FALSE)# Everything mentioning VAT hmrc_search("vat") # Only annual publications already implemented hmrc_search(implemented = TRUE, frequency = "annual") # Roadmap items mentioning capital gains hmrc_search("capital gains", implemented = FALSE)
Downloads and tidies the HMRC Annual Stamp Tax Statistics, covering Stamp Duty Land Tax (SDLT), Stamp Duty Reserve Tax (SDRT) on shares, and other stamp duties. Annual data from 2003-04 to the most recent financial year, published each December.
hmrc_stamp_duty(type = NULL, cache = TRUE)hmrc_stamp_duty(type = NULL, cache = TRUE)
type |
Character vector or |
cache |
Logical. Use cached file if available (default |
An hmrc_tbl with columns tax_year, type, description,
receipts_gbp_m (rounded to nearest GBP 5m by HMRC).
https://www.gov.uk/government/statistics/uk-stamp-tax-statistics
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_stamp_duty() hmrc_stamp_duty(type = "sdlt_total") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_stamp_duty() hmrc_stamp_duty(type = "sdlt_total") options(op)
Downloads and tidies the HMRC Measuring the Tax Gap publication, which estimates the difference between the tax theoretically owed and the tax actually collected, broken down by tax type and taxpayer group. Published annually in June, covering the most recent financial year.
hmrc_tax_gap(tax = NULL, cache = TRUE)hmrc_tax_gap(tax = NULL, cache = TRUE)
tax |
Character vector or |
cache |
Logical. Use cached file if available (default |
The tax gap publication is cross-sectional: each edition covers a single financial year. This function returns data for the most recent edition available on GOV.UK. Historical estimates back to 2005-06 are available in a separate HMRC publication (Measuring the Tax Gap: Time Series).
An hmrc_tbl with columns tax_year, tax, taxpayer_type,
component, gap_pct, gap_gbp_bn, uncertainty.
https://www.gov.uk/government/statistics/measuring-tax-gaps
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_tax_gap() hmrc_tax_gap(tax = "VAT") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_tax_gap() hmrc_tax_gap(tax = "VAT") options(op)
Downloads and tidies the monthly HMRC Tax Receipts and National Insurance Contributions bulletin published on GOV.UK. The bulletin covers all major UK taxes and duties from April 2008 to the most recent month (monthly granularity), updated on approximately the 15th working day of each month.
hmrc_tax_receipts(tax = NULL, start = NULL, end = NULL, cache = TRUE)hmrc_tax_receipts(tax = NULL, start = NULL, end = NULL, cache = TRUE)
tax |
Character vector of tax head identifiers, or |
start |
Character |
end |
Character |
cache |
Logical. If |
An hmrc_tbl (subclass of data.frame) with columns:
Date. The first day of the reference month.
Character. Tax or duty identifier (see
hmrc_list_tax_heads()).
Character. Plain-English series label.
Numeric. Cash receipts in millions of pounds (GBP).
Provenance metadata (source URL, fetch time, vintage) is attached as
the "hmrc_meta" attribute and can be inspected with hmrc_meta().
https://www.gov.uk/government/statistics/hmrc-tax-and-nics-receipts-for-the-uk
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tobacco_duties(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_tax_receipts() hmrc_tax_receipts(tax = c("income_tax", "vat")) hmrc_tax_receipts(start = "2020-04") hmrc_tax_receipts(tax = "vat", start = "2019-01", end = "2024-12") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_tax_receipts() hmrc_tax_receipts(tax = c("income_tax", "vat")) hmrc_tax_receipts(start = "2020-04") hmrc_tax_receipts(tax = "vat", start = "2019-01", end = "2024-12") options(op)
Downloads and tidies the HMRC Tobacco Bulletin, which reports monthly tobacco products duty receipts by product type. Data runs from January 1991 to the most recent published month, updated twice per year (February and August).
hmrc_tobacco_duties(product = NULL, start = NULL, end = NULL, cache = TRUE)hmrc_tobacco_duties(product = NULL, start = NULL, end = NULL, cache = TRUE)
product |
Character vector or |
start |
Character |
end |
Character |
cache |
Logical. Use cached file if available (default |
An hmrc_tbl with columns date, product, description,
receipts_gbp_m.
https://www.gov.uk/government/statistics/tobacco-bulletin
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_vat()
op <- options(hmrc.cache_dir = tempdir()) hmrc_tobacco_duties(start = "2015-01") hmrc_tobacco_duties(product = "cigarettes") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_tobacco_duties(start = "2015-01") hmrc_tobacco_duties(product = "cigarettes") options(op)
Downloads and tidies the HMRC VAT Annual Statistics bulletin, which reports monthly VAT receipts broken down into payments, repayments, import VAT, and home VAT. Monthly data runs from April 1973; the bulletin is published annually (December).
hmrc_vat(measure = NULL, start = NULL, end = NULL, cache = TRUE)hmrc_vat(measure = NULL, start = NULL, end = NULL, cache = TRUE)
measure |
Character vector or |
start |
Character |
end |
Character |
cache |
Logical. Use cached file if available (default |
Note that early years (pre-1985) have suppressed payment and repayment splits; only the total is available for those periods. From January 2021, import VAT collected via postponed VAT accounting is recorded within payments and repayments rather than the import VAT column.
An hmrc_tbl with columns date, measure, description,
receipts_gbp_m. Repayments are negative.
https://www.gov.uk/government/statistics/value-added-tax-vat-annual-statistics
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_gap(),
hmrc_tax_receipts(),
hmrc_tobacco_duties()
op <- options(hmrc.cache_dir = tempdir()) hmrc_vat(measure = "total", start = "2010-01") hmrc_vat(start = "2020-01") options(op)op <- options(hmrc.cache_dir = tempdir()) hmrc_vat(measure = "total", start = "2010-01") hmrc_vat(start = "2020-01") options(op)
A data frame describing all tax and duty series available in
hmrc_tax_receipts().
tax_headstax_heads
A data frame with 41 rows and 4 columns:
Character. Identifier used in the tax argument of
hmrc_tax_receipts().
Character. Plain-English description.
Character. Broad grouping: "income", "nics",
"consumption", "property", "environment", "expenditure",
"other", or "total".
Character. Approximate start year of monthly data.
Derived from the HMRC Tax Receipts and NICs bulletin. https://www.gov.uk/government/statistics/hmrc-tax-and-nics-receipts-for-the-uk