Examples: visualization, C++, networks, data cleaning, html widgets, ropensci.

Found 189 packages in 0.01 seconds

ons — by Charles Coverdale, 15 days ago

Download Data from the 'Office for National Statistics'

Provides functions to download and tidy statistical data published by the 'Office for National Statistics' < https://www.ons.gov.uk>. Covers GDP, inflation (CPI, CPIH, RPI), unemployment, employment, wages, trade, retail sales, house prices, productivity, population, and public sector finances. Most series are fetched from the 'ONS' website using its CSV time series endpoint. House price data is sourced from 'HM Land Registry' < https://www.gov.uk/government/organisations/land-registry>. Data is cached locally between sessions.

yieldcurves — by Charles Coverdale, 8 months ago

Yield Curve Fitting, Analysis, and Decomposition

Fits yield curves using Nelson-Siegel (1987) , Svensson (1994) , and cubic spline methods. Extracts forward rates, discount factors, and par rates from fitted curves. Computes duration and convexity risk measures. Computes Z-spread and key rate durations. Provides principal component decomposition following Litterman and Scheinkman (1991) , carry and roll-down analysis, and slope measures. All methods are pure computation with no external dependencies beyond base R; works with yield data from any source.

climatekit — by Charles Coverdale, 15 days ago

Unified Climate Indices for Temperature, Precipitation, and Drought

Compute the standard suite of climate indices from daily weather observations. Provides the canonical 'ETCCDI' 27 (Expert Team on Climate Change Detection and Indices), the 'ET-SCI' heatwave and cold-wave families plus the Excess Heat Factor of Nairn and Fawcett (2013), and agroclimatic, drought, and human-comfort families. Drought indices ('SPI', 'SPEI') accept a choice of distribution (gamma or Pearson III for SPI; log-logistic or generalised extreme value for SPEI). Reference evapotranspiration is available via Hargreaves and the FAO-56 Penman-Monteith method (Allen et al. 1998). Percentile-based indices support the Zhang (2005) in-base bootstrap. Daily inputs are numeric vectors plus a 'Date' vector; outputs are tidy data frames. Optional gridded support via 'terra' applies any index over a 'SpatRaster' and reads 'netCDF' input. No external API calls; pairs with data packages such as 'readnoaa'. References: Alexander et al. (2006) ; Zhang et al. (2011) ; Zhang et al. (2005) .

ato — by Charles Coverdale, 15 days ago

Download and Tidy Australian Taxation Office Data

Fetch Australian Taxation Office (ATO) Taxation Statistics and related datasets via the data.gov.au Comprehensive Knowledge Archive Network ('CKAN') API < https://data.gov.au/data/api/3/>. Provides tidy access to individual, company, superannuation, goods and services tax (GST), fringe benefits tax (FBT), Voluntary Tax Transparency Code (VTTC), Pay As You Go (PAYG) withholding, charity, excise, and Corporate Tax Transparency data, plus Petroleum Resource Rent Tax, Medicare Levy Surcharge, and fuel tax credit aggregates. Includes reproducibility helpers (snapshot pinning, SHA-256 cache integrity, session manifest, optional 'Zenodo' deposit), classification crosswalks (ANZSIC 2006 to 2020, ANZSCO 2013 to 2021), panel harmonisation, reconciliation against Final Budget Outcome totals, and real-terms and per-capita helpers backed by bundled Australian Bureau of Statistics (ABS) Consumer Price Index and Estimated Resident Population series. Bridges to the 'taxstats' 2 per cent microdata sample via column-schema mapping. Data is published by the Australian Taxation Office under Creative Commons Attribution 2.5 Australia or 3.0 Australia licences (dataset-dependent).

ivcheck — by Charles Coverdale, 6 months ago

Tests for Instrumental Variable Validity

Implements tests for the identifying assumptions of instrumental variable models, the local exclusion restriction and monotonicity conditions required for local average treatment effect identification. Covers Kitagawa (2015) , Mourifie and Wan (2017) , and Frandsen, Lefgren, and Leslie (2023) . Includes a one-shot wrapper that runs all applicable tests on a fitted instrumental variable model. Dispatches on 'fixest' and 'ivreg' model objects.

comtrade — by Charles Coverdale, 2 months ago

Access and Analyse UN Comtrade International Trade Data

Download and analyse international merchandise and services trade data from the United Nations Comtrade database < https://comtradeplus.un.org/>. Retrieve bilateral trade flows, compute trade analytics (revealed comparative advantage, trade concentration, trade balance), and convert between commodity classifications (Harmonised System 'HS', Standard International Trade Classification 'SITC', Broad Economic Categories 'BEC'). Covers 200+ reporter countries, 60+ years of goods trade data (1962-present), and services trade via Extended Balance of Payments Services ('EBOPS'). Works without registration for basic queries. A free Application Programming Interface ('API') key from < https://comtradedeveloper.un.org/> unlocks full access.

magentabook — by Charles Coverdale, 2 months ago

HM Treasury Magenta Book Policy Evaluation Primitives

Implements policy evaluation primitives from HM Treasury Magenta Book guidance (HM Treasury, 2026): theory of change and log-frame construction, evaluation planning and stakeholder mapping, power and minimum-detectable-effect calculations for randomised designs (including cluster and stepped-wedge designs following Hussey and Hughes (2007) and Hemming et al. (2015) ), Maryland Scientific Methods Scale ratings, structured confidence ratings, light-weight difference-in-differences and interrupted-time-series estimators (Bernal et al. (2017) ) with cluster-robust standard errors (Cameron and Miller (2015) ), pre-treatment balance checks (Stuart (2010) ), and cost-effectiveness analysis (cost per outcome, incremental cost-effectiveness ratio, acceptability curves, incremental net benefit, quality-adjusted and disability-adjusted life years). Designed as the evaluation companion to the appraisal package 'greenbook'. Bundled rubric and reference tables carry vintage metadata for reproducibility. Aligned with the May 2026 republication of the Magenta Book.

fred — by Charles Coverdale, 15 days ago

Access 'Federal Reserve Economic Data'

Provides clean, tidy access to economic data from the 'Federal Reserve Economic Data' ('FRED') API < https://fred.stlouisfed.org/docs/api/fred/>. 'FRED' is maintained by the 'Federal Reserve Bank of St. Louis' and contains over 800,000 time series from 118 sources covering GDP, employment, inflation, interest rates, trade, and more. Dedicated functions fetch series observations, search for series, browse categories, releases, and tags, and retrieve series metadata. Multiple series can be fetched in a single call, in long or wide format. Server-side unit transformations (percent change, log, etc.) and frequency aggregation are supported, with readable transform aliases such as 'yoy_pct' and 'log_diff'. Real-time and vintage helpers (built on 'ALFRED') return a series as it appeared on a given date, the first-release version, every revision, or a panel of selected vintages. An offline curated catalogue of around fifty popular series, NBER recession reference dates, and FOMC meeting dates support discoverability and event-study workflows. Default 'plot' method shades NBER recession periods. Reproducibility helpers produce BibTeX or plain-text citations and YAML manifests with per-object hashes. Data is cached locally for subsequent calls. This product uses the 'FRED' API but is not endorsed or certified by the 'Federal Reserve Bank of St. Louis'.

obr — by Charles Coverdale, 15 days ago

Access 'Office for Budget Responsibility' Data

Provides clean, tidy access to data published by the 'Office for Budget Responsibility' ('OBR'), the UK's independent fiscal watchdog. Covers the Public Finances Databank (outturn for PSNB, PSND, receipts, and expenditure since 1946), the Historical Official Forecasts Database (every 'OBR' forecast since 2010), the Economic and Fiscal Outlook detailed forecast tables (five-year projections from the latest Budget), the monthly profiles for the public finances (the 'OBR' forecast apportioned across the months of the fiscal year), and the Welfare Trends Report (incapacity benefit spending and caseloads). All returned objects carry provenance metadata recording the source URL, publication vintage, retrieval time, and file fingerprint, so analyses can be audited and reproduced. Data is downloaded from the 'OBR' on first use and cached locally for subsequent calls. Data is sourced from the 'OBR' website < https://obr.uk>.

readoecd — by Charles Coverdale, 15 days ago

Download and Tidy Data from the 'OECD'

Provides clean, tidy access to key economic indicators published by the 'Organisation for Economic Co-operation and Development' ('OECD'), covering GDP, CPI inflation, unemployment, tax revenue, government deficit, health expenditure, education expenditure, income inequality, labour productivity, and current account balance across all 38 'OECD' member countries. Data is downloaded from the 'OECD Data Explorer' API < https://data-explorer.oecd.org> on first use and cached locally for subsequent calls. Returns tidy long-format data frames ready for analysis and visualisation.