From peer review here, it was pointed out that the calculation of mean listing price by district can be vectorized.
The code in question resides in the EDA.R script with function name mean_price. Right now, the code outputs a 10x2 tibble with district name in the first column and mean price in the second column. This output is subsequently called in violin_plot function also in the EDA.R script.
Any changes should either output the same format or else the violin_plot function needs to be adjusted to the new vectorized output.
I played around with the dplyr::group_map functions and the purrr::map functions. Revisit as time permits.
From peer review here, it was pointed out that the calculation of mean listing price by district can be vectorized.
The code in question resides in the
EDA.R
script with function namemean_price
. Right now, the code outputs a 10x2 tibble with district name in the first column and mean price in the second column. This output is subsequently called inviolin_plot
function also in theEDA.R
script.Any changes should either output the same format or else the
violin_plot
function needs to be adjusted to the new vectorized output.I played around with the
dplyr::group_map
functions and thepurrr::map
functions. Revisit as time permits.