Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_erp function #261

Merged
merged 2 commits into from
Jan 14, 2025
Merged

read_erp function #261

merged 2 commits into from
Jan 14, 2025

Conversation

fmarkham
Copy link

As per issue 260, this pull request contains a function that simplifies accessing ERPs for states and territories by age group and sex. The motivating use case is to access ERPs for those aged 18 or over, which isn't published in an easily accessible series as far as I know.

I'm not an experienced package author, so you may wish to review the code.

@MattCowgill
Copy link
Owner

Thanks @fmarkham, will review when I can (hopefully this week)

@MattCowgill MattCowgill marked this pull request as draft November 18, 2024 07:54
@MattCowgill MattCowgill self-assigned this Nov 18, 2024
@MattCowgill MattCowgill self-requested a review November 18, 2024 07:54
@MattCowgill MattCowgill removed their assignment Nov 18, 2024
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 52 lines in your changes missing coverage. Please review.

Please upload report for BASE (read_erp@9b2d4d7). Learn more about missing BASE report.

Files with missing lines Patch % Lines
R/read_erp.R 0.00% 52 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             read_erp     #261   +/-   ##
===========================================
  Coverage            ?   88.37%           
===========================================
  Files               ?       30           
  Lines               ?     1351           
  Branches            ?        0           
===========================================
  Hits                ?     1194           
  Misses              ?      157           
  Partials            ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@MattCowgill MattCowgill left a comment

Choose a reason for hiding this comment

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

Hey @fmarkham this is fantastic! Thanks so much. I'm going to merge it into a branch, then add some unit tests, then go to master.

@MattCowgill MattCowgill changed the base branch from master to read_erp January 14, 2025 10:08
@MattCowgill MattCowgill marked this pull request as ready for review January 14, 2025 10:09
@MattCowgill MattCowgill merged commit c2f85fb into MattCowgill:read_erp Jan 14, 2025
4 of 6 checks passed
@MattCowgill
Copy link
Owner

@fmarkham the output doesn't have an age column - I assume that's a mistake?

@fmarkham
Copy link
Author

fmarkham commented Jan 16, 2025

It was intentional as the motivating use case (get the population aged 18 plus by state and sex over time) doesn't require age in single years to be returned.

But this is more general and perhaps in keeping with the style of read_abs so I don't really mind. It simple enough to do an additional group_by on the results.

Thanks for refactoring the code, learnt a few things looking at your edits :)

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.

2 participants