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

465 imputation links #63

Merged
merged 8 commits into from
Aug 19, 2024
Merged

465 imputation links #63

merged 8 commits into from
Aug 19, 2024

Conversation

KateyMatthews
Copy link
Collaborator

Summary

Merging counts onto main data and pivoting by link_type.
Summing imputation_value by period, cell and question.

Add your summary here - keep it brief, to the point, and in plain English.

Checklists

This pull request meets the following requirements:

  • 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 docstings
  • 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
  • tests suite passes (locally as a minimum)
  • peer reviewed with review recorded

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

@lhubbardONS lhubbardONS self-requested a review July 31, 2024 09:49
@AntonZogk AntonZogk self-requested a review August 8, 2024 09:15
df = df.query("{} in {}".format(date, selected_periods))

links_df = df.melt(
id_vars=[date, sic, cell, question, imputed_value],
Copy link
Collaborator

Choose a reason for hiding this comment

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

why imputed_value needs to be in index ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Am I right in thinking we are going to keep this in (following discussion on Teams)?


"""
if selected_periods is not None:
df = df.query("{} in {}".format(date, selected_periods))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Loved line 110 beautiful approach !

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Luke's work 🙂

Copy link
Collaborator

@AntonZogk AntonZogk left a comment

Choose a reason for hiding this comment

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

Nice work, all looking good. I think we should change the function name and add some information in the docstrings too, after this happy to be merged.

Melting and mapping is used twice , it would be nice to have a function for this.

Copy link
Collaborator

@AntonZogk AntonZogk left a comment

Choose a reason for hiding this comment

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

All looking good, thanks for applying the changes :)

@KateyMatthews KateyMatthews merged commit 60efe2a into main Aug 19, 2024
3 checks passed
@lhubbardONS lhubbardONS deleted the 465-imputation-links branch October 1, 2024 07:33
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