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

Found 189 packages in 0.02 seconds

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.

boe — by Charles Coverdale, 3 months ago

Download Data from the 'Bank of England' Statistical Database

Provides functions to download and tidy statistical data published by the 'Bank of England' < https://www.bankofengland.co.uk>. Covers Bank Rate, 'SONIA', gilt yields, exchange rates, mortgage rates, mortgage approvals, consumer credit, and money supply. Series are fetched from the 'Bank of England Interactive Statistical Database' using its CSV endpoint. Data is cached locally between sessions.

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.

climatekit — by Charles Coverdale, 12 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) .

inequality — by Charles Coverdale, 12 days ago

Inequality Measurement, Decomposition, and Poverty Analysis

Tools for measuring income and wealth inequality. Computes the Gini coefficient with bootstrap or asymptotic confidence intervals following Davidson (2009) , the extended S-Gini family, Theil T and L indices (generalised entropy family), the Atkinson index, the Kolm absolute inequality index, Palma ratio, Hoover index, percentile ratios, and Lorenz curves. Supports between-within group decomposition following Bourguignon (1979) , income share tabulation, concentration indices for health inequality with Erreygers (2009) correction, Kakwani tax progressivity and Reynolds-Smolensky redistribution indices, Foster-Greer-Thorbecke poverty measures including the Sen index, growth incidence curves following Ravallion and Chen (2003) , and Wolfson polarisation. All functions accept optional survey weights and work with data from any source.

greenbook — by Charles Coverdale, 12 days ago

HM Treasury Green Book Cost-Benefit Analysis Primitives

Implements cost-benefit analysis primitives from HM Treasury Green Book guidance (HM Treasury, 2026): the kinked Social Time Preference Rate (STPR) as revised in October 2026, with the earlier schedule retained for reproducibility, discount factors, net present value (NPV), equivalent annual cost, and real-terms rebasing using the GDP deflator. Designed for UK central government appraisal and evaluation. Bundled parameter tables carry vintage metadata for reproducibility.

aemo — by Charles Coverdale, 12 days ago

Download Australian Energy Market Operator Data

Fetch Australian Energy Market Operator (AEMO) public data from 'NEMweb' < http://nemweb.com.au> and the Market Management System Data Model (MMSDM) historical archive. Provides tidy access to 5-minute and 30-minute wholesale electricity prices, regional demand, dispatch-unit output, interconnector flows, rooftop photovoltaic generation, generator bids, predispatch forecasts, frequency control ancillary services markets, and gas market data across the National Electricity Market (NEM) regions. Data is published by AEMO under its Copyright Permissions Notice < https://www.aemo.com.au/privacy-and-legal-notices/copyright-permissions>.

inflationkit — by Charles Coverdale, 12 days ago

Inflation Decomposition, Core Measures, and Trend Estimation

Tools for analysing inflation dynamics. Computes weighted contributions of price index components, core inflation measures (trimmed mean, weighted median, exclusion-based) following Bryan and Cecchetti (1994), inflation persistence via sum-of-AR-coefficients, diffusion indices, Phillips curve estimation, breakeven inflation, and trend inflation using the Beveridge-Nelson decomposition and Hodrick-Prescott filter. All functions are pure computation and work with price data from any source.

ukhousing — by Charles Coverdale, 10 days ago

Access UK Housing Data from Land Registry, Planning, and 'ONS'

Fetch UK housing data from official sources. Access the UK House Price Index and Price Paid Data from 'HM Land Registry' < https://landregistry.data.gov.uk/>, planning application, brownfield land, and local plan data from 'planning.data.gov.uk' < https://www.planning.data.gov.uk/>, and the Price Index of Private Rents from the 'Office for National Statistics'. Data covers all 441 UK local authorities from 1995 to the present. Functions accept flexible filters (postcode, local authority, property type, date range) and return tidy data frames. Downloaded data is cached locally for subsequent calls.