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

Scope out functions to create #16

Open
ttimbers opened this issue Mar 11, 2022 · 1 comment
Open

Scope out functions to create #16

ttimbers opened this issue Mar 11, 2022 · 1 comment
Milestone

Comments

@ttimbers
Copy link
Contributor

No description provided.

@ttimbers ttimbers added this to the milestone2 milestone Mar 11, 2022
@ttimbers
Copy link
Contributor Author

ttimbers commented Mar 11, 2022

Here is my idea on how we can modularize some of our code to functions to reduce redundancy:

  1. A function named summarize_col that takes a data frame, and name of a column and returns the median, mean and standard deviation for that column. We would call it to create listings_train_summary and listings_test_summary

  2. A function named scatter_lm that takes a data frame, a col to map to the x-axis, a column to map to the y-axis. It would return a scatter plot with a linear regression line. It would reduce the repetitive code current in our EDA section - especially if we paired it with mapping it across the data frame columns to generate a list to plot with plot_grid.

  3. We could make our repetitive and verbose use of str_remove(...) |> as.numeric() inside mutate more readable by abstracting this to a function. We could name this function make_numeric.

@ttimbers ttimbers changed the title Create function specifications, and setup controllability and automation for tests Scope out functions to create Mar 11, 2022
@ttimbers ttimbers reopened this Jun 21, 2022
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

No branches or pull requests

1 participant