# widr 0.1.1
* Rewrote `code-dictionary` vignette: features all WID Codes Dictionary sections and code tables, with `widr` function calls integrated throughout.

# widr 0.1.0

Initial CRAN release.

### Download

* `download_wid()`: download data from the WID API; returns a `wid_df`, a classed `data.frame` compatible with dplyr and ggplot2 without unwrapping
* `download()`: alias for `download_wid()`

### Code grammar

* `wid_validate()`, `wid_is_valid()`: validate WID code components; the latter returns a scalar logical without throwing
* `wid_encode()`, `wid_decode()`: convert between variable codes (e.g. `"sptinc992j"`) and named component lists
* `wid_search()`: search any of the six reference tables by regex

### Post-download helpers

* `wid_tidy()`: decode variable codes into human-readable columns; coerce`year` to integer and `value` to double
* `wid_convert()`: currency conversion via WID exchange-rate series; supports `"lcu"`, `"usd"`, `"eur"`, `"gbp"`, `"ppp"`, `"yppp"`
* `wid_metadata()`: fetch source and methodological information for the variables in a `wid_df`

### Inequality measures

* `wid_gini()`: Gini coefficient from a share series
* `wid_top_share()`: top fractile income or wealth share
* `wid_percentile_ratio()`: percentile ratio (e.g. P90/P10) from a threshold series

### Plotting

* `wid_plot_timeseries()`: time-series line chart; returns a `ggplot` object
* `wid_plot_compare()`: cross-country bar or point chart for a single year
* `wid_plot_lorenz()`: Lorenz curve

### Query objects

* `wid_query()`: build a reusable query object
* `wid_filter()`: update query fields
* `wid_fetch()`: execute a query

### Cache

* `wid_cache()`: get, set, list, or clear cached API responses
* `wid_cache_list()`: list cached files
* `wid_cache_clear()`: remove all cached files

### Reference tables

Six lookup tables synchronised from <https://wid.world/codes-dictionary/>:`wid_series_types`, `wid_concepts`, `wid_ages`, `wid_pop_types`, `wid_countries`, `wid_percentiles`.
