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

Initially aggregate loans by appropriate groups. #270

Closed
wants to merge 6 commits into from
Closed

Initially aggregate loans by appropriate groups. #270

wants to merge 6 commits into from

Conversation

jdhoffa
Copy link
Member

@jdhoffa jdhoffa commented Jan 19, 2021

I was hasty in writing #263, in which I added an aggregation step to aggregate similar loans to different companies, if these loans mapped to the same ALD company. I used a group_by_at(...), and setdiff() to aggregate by all but a few columns, which was lazy of me, and didn't think about the downstream issues of grouping by a set of columns that should in fact map to the same information.

Here, I have made the aggregation step more specific, by grouping only by the relevant columns:

group_by(
      .data$level,
      .data$loan_size_outstanding_currency,
      .data$loan_size_credit_limit_currency,
      .data$name_ald,
      .data$sector_ald
      ) 

Relates to #262
Closes #265

Copy link
Contributor

@maurolepore maurolepore left a comment

Choose a reason for hiding this comment

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

LGTM but WARNING: This PR seems to depend on another open PR. Please remember to handle that dependency.

R/target_market_share.R Show resolved Hide resolved
R/target_market_share.R Show resolved Hide resolved
@jdhoffa
Copy link
Member Author

jdhoffa commented Jan 21, 2021

I'm going to close this, and open a new PR request that doesn't depend on #268

@jdhoffa jdhoffa closed this Jan 21, 2021
@jdhoffa jdhoffa deleted the 265-aggregate_tech_share branch January 21, 2021 10:16
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.

Technology share values persist being off due to aggregation by name_ald
2 participants