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

added metadata to crowding, edited process_resp #91

Closed
wants to merge 25 commits into from
Closed

Conversation

realbp
Copy link
Contributor

@realbp realbp commented Mar 21, 2024

Hey @seankross, @howardbaek

Please checkout the new addition of metadata in cancerprof, I edited process_resp to be able to produce metadata information as a list of chars ad output the metadata and the dataframe in a list. So far, Ive only added the include_metadata parameter to demo_crowding.

Please let me know with any feedback!

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 41.50943% with 31 lines in your changes are missing coverage. Please review.

Project coverage is 96.55%. Comparing base (fc5818d) to head (69b05bc).

❗ Current head 69b05bc differs from pull request most recent head cb8eb4d. Consider uploading reports for the commit cb8eb4d to get more accurate results

Files Patch % Lines
R/process_metadata.R 0.00% 11 Missing ⚠️
R/demo-crowding.R 52.94% 8 Missing ⚠️
R/demo-education.R 52.94% 8 Missing ⚠️
R/process-resp.R 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
- Coverage   97.85%   96.55%   -1.31%     
==========================================
  Files          51       52       +1     
  Lines        2288     2324      +36     
==========================================
+ Hits         2239     2244       +5     
- Misses         49       80      +31     

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

Comment on lines 85 to 95
result_df <- process_metadata(resp)

} else {
resp %>%
setNames(c(
get_area(areatype),
"Percent",
"Households",
"Rank"
)) %>%
mutate(across(c("Percent", "Households"), \(x) as.numeric(x)))

Choose a reason for hiding this comment

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

It isn't immediately clear that this function returns result_df if include_metadata == TRUE and returns the output of the else statement if include_metadata == FALSE.

I would assign the output of running the dplyr verbs to result_df and then return result_df at the very last line of this function.

Comment on lines 105 to 116
result_df <- process_metadata(resp)

} else {
resp %>%
setNames(c(
get_area(areatype),
"Percent",
"Households",
"Rank"
)) %>%
mutate(across(c("Percent", "Households"), \(x) as.numeric(x)))
}

Choose a reason for hiding this comment

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

Same comments as the ones left in demo_crowding.R

@seankross seankross closed this May 22, 2024
@seankross seankross deleted the metadata branch June 25, 2024 18:44
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.

4 participants