New function get_party_color() - vectorized color extraction with support for
multiple colors (all_colors parameter) and color normalization.
New function get_party_logo() - extract party logo URLs from Wikipedia pages.
New function get_party_info() - extract both color and logo in a single call
for better efficiency.
New Partyfacts integration:
get_partyfacts_wikipedia() - download the Partyfacts Wikipedia datasetlookup_party_url() - search for parties by name and countryget_party_color_by_name() - convenience function combining lookup and
color extractionclear_partycolor_cache() - clear cached Partyfacts dataFunctions are now fully vectorized and work seamlessly with dplyr::mutate().
Better error handling - invalid URLs return NA instead of throwing errors.
Color normalization converts named colors (e.g., "red") to hex codes and expands 3-digit hex codes to 6 digits.
Added comprehensive test suite using testthat.
Complete vignette with examples and best practices.
Updated to use modern tidyverse patterns (replaced gather/spread with
pivot_longer/pivot_wider).
The original wikipedia_party_color() function is now deprecated. Use
get_party_color() instead.
The package now requires R >= 4.1.0.
Added detailed function documentation with examples.
New vignette: "Getting Started with partycoloR".
Updated README with feature overview and quick start guide.
Initial release with wikipedia_party_color() function.
Extract party colors from English Wikipedia party pages.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.