Software accompanying Gary King's book: A Solution to the Ecological Inference Problem. (1997). Princeton University Press. ISBN 978-0691012407.

Provides more than 550 data sets of actual election results. 
    Each of the data sets includes aggregate party and candidate outcomes at the voting
    unit (polling stations) level and two-way cross-tabulated results at the district level.
    These data sets can be used to assess ecological inference algorithms devised 
    for estimating RxC (global) ecological contingency tables using exclusively aggregate results 
    from voting units.
    Reference:
    Pavía (2022) <doi:10.1177/08944393211040808>.

Provides API access to data from the U.S. Energy Information Administration ('EIA') <https://www.eia.gov/>.
    Use of the EIA's API and this package requires a free API key obtainable at <https://www.eia.gov/opendata/register.php>.
    This package includes functions for searching the EIA data directory and returning time series and geoset time series datasets.
    Datasets returned by these functions are provided by default in a tidy format, or alternatively, in more raw formats.
    It also offers helper functions for working with EIA date strings and time formats and for inspecting different summaries of series metadata.
    The package also provides control over API key storage and caching of API request results.

Provides a function to query and extract data from the 'US Energy Information Administration' ('EIA') API V2  <https://www.eia.gov/opendata/>. The 'EIA' API provides a variety of information, in a time series format, about the energy sector in the US. The API is open, free, and requires an access key and registration at <https://www.eia.gov/opendata/>.

Estimates RxC (R by C) vote transfer matrices (ecological contingency tables) from aggregate data using the model described in Forcina et al. (2012), as extension of the model proposed in Brown and Payne (1986). Allows incorporation of covariates.
   References:
   Brown, P. and Payne, C. (1986). ''Aggregate data, ecological regression and voting transitions''. Journal of the American Statistical Association, 81, 453–460. <DOI:10.1080/01621459.1986.10478290>.
   Forcina, A., Gnaldi, M. and Bracalente, B. (2012). ''A revised Brown and Payne model of voting behaviour applied to the 2009 elections in Italy''. Statistical Methods & Applications, 21, 109–119. <DOI:10.1007/s10260-011-0184-x>.
   Pavia, J.M, and Forcina, A. (2026). ''Simulating electoral behavior''. Modeling Decisions for Artificial Intelligence, MDAI 2025. Lecture Notes in Computer Science, vol 15957, Torra, V., Narukawa, Y., Domingo-Ferrer, J. (eds), Springer, Cham, pp. 54-65. <DOI:10.1007/978-3-032-00891-6_5>.
   Acknowledgements:
   The authors wish to thank Consellería de Educación, Cultura, Universidades y Empleo, Generalitat Valenciana (grant CIAICO/2023/031) and MICIU/AEI/10.13039/501100011033/FEDER, EU (grant PID2021-128228NB-I00) for supporting this research.