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

692 create population counts #137

Merged
merged 11 commits into from
Dec 19, 2024
Merged

692 create population counts #137

merged 11 commits into from
Dec 19, 2024

Conversation

Jday7879
Copy link
Collaborator

@Jday7879 Jday7879 commented Dec 17, 2024

Pull Request Title

Creating population counts function

Summary

function to create the population count output for MBS
This can be output as dataframe or saved to output_path as an optional extra

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Checklists

This pull request meets the following requirements:

Creator Checklist

  • Installable with all dependencies recorded
  • Runs without error
  • Follows PEP8 and project-specific conventions
  • Appropriate use of comments, for example, no descriptive comments
  • Functions documented using Numpy style docstrings
  • Assumptions and decisions log considered and updated if appropriate
  • Unit tests have been updated to cover essential functionality for a reasonable range of inputs and conditions
  • Other forms of testing such as end-to-end and user-interface testing have been considered and updated as required

If you feel some of these conditions do not apply for this pull request, please
add a comment to explain why.

Reviewer Checklist

  • Test suite passes (locally as a minimum)
  • Peer reviewed with review recorded

Additional Information

Please provide any additional information or context that would help the reviewer understand the changes in this pull request.

Related Issues

Link any related issues or pull requests here.

@Jday7879 Jday7879 marked this pull request as ready for review December 17, 2024 11:21
Copy link
Collaborator

@robertswh robertswh left a comment

Choose a reason for hiding this comment

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

Looks great. I've made a couple of suggestion for comments and I think the sampled column name needs changing to is_sampled to be consistent with all the changes I committed to this branch yesterday. Happy to merge once you've checked those suggestions.

mbs_results/estimation/apply_estimation.py Outdated Show resolved Hide resolved
mbs_results/estimation/apply_estimation.py Outdated Show resolved Hide resolved
)

df_sampled = calculate_turnover_sum_count(
df.loc[df["sampled"]], period, strata, colname="sample", **config
Copy link
Collaborator

Choose a reason for hiding this comment

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

I changed this to "is_sampled" everywhere else, so I think it needs changing here

tests/estimation/test_create_population_counts.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@robertswh robertswh left a comment

Choose a reason for hiding this comment

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

Great work

@Jday7879 Jday7879 merged commit 23a75ff into main Dec 19, 2024
5 checks passed
@Jday7879 Jday7879 deleted the 692-create-population-counts branch December 19, 2024 16:07
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