Skip to content

Aneel new download for energy_development_budget #315

Merged
giovannaribeirops merged 14 commits intomasterfrom
Aneel_new_download
Apr 27, 2026
Merged

Aneel new download for energy_development_budget #315
giovannaribeirops merged 14 commits intomasterfrom
Aneel_new_download

Conversation

@geronimopulitini
Copy link
Copy Markdown
Contributor

@geronimopulitini geronimopulitini commented Apr 6, 2026

A new parameter (year = NULL) has been added to the load_aneel function. This parameter is required for the energy_development_budget dataset, which contains separate files for each year between 2017 and 2022.

The download is now performed directly from the ANEEL website via the following link: https://dadosabertos.aneel.gov.br/dataset/beneficiarios-da-cde

Solves #312

Note: The changes have already been tested and are fully functional.

The original google drive has been lost. In this case, we have changed the download method.
now with this fix the user can define the year parameter how a vector. Not only a scale number.
Includes the year parameter for load_aneel and a new demonstrative example using this parameter.
Copy link
Copy Markdown
Contributor

@giovannaribeirops giovannaribeirops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transfer changes from .md to .Rmd

Add roxygen documentation for the new year parameter in load_aneel.
Clarify that it is required for energy_development_budget and ignored for other datasets.
Update examples to include the new usag
Add year column consistently for energy_development_budget outputs.
Apply the same behavior to both single-year and multi-year downloads.
Avoid duplicating the column when year or ano already exists.
Validate energy_development_budget years at the load_aneel entry point.
Fail early for missing or unsupported years with a clearer error message.
Keep valid year range aligned with the available ANEEL CDE files.
Regenerate Rd files after documenting the new year argument in load_aneel.
Include generated documentation updates from the package check workflow.
Update ANEEL vignette to reflect the new year argument for
energy_development_budget.

Document the valid 2017-2022 range, clarify that year can be
a single value or a vector, and fix ANEEL usage examples.
Clarify the valid 2017-2022 range, describe single-year and multi-year
usage, fix examples, and regenerate README.md from README.Rmd.
@bernardo-sieira
Copy link
Copy Markdown
Contributor

As a temporary fix, it will work. I'll insert more changes into the long-term plan so after the cran-submission we can get this function back into the datazoom shape and broad its use.

Copy link
Copy Markdown
Contributor

@bernardo-sieira bernardo-sieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short-term solution

@giovannaribeirops giovannaribeirops merged commit 8f9294d into master Apr 27, 2026
@giovannaribeirops giovannaribeirops deleted the Aneel_new_download branch April 27, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants