njtierney / maxcovr

Tools in R to make it easier to solve the Maximal Coverage Location Problem
http://maxcovr.njtierney.com/
GNU General Public License v3.0
43 stars 12 forks source link

Add broom tidy, augment, and glance methods #31

Open njtierney opened 7 years ago

njtierney commented 7 years ago

print provides a concise, human readable description

summary provides a more verbose human readable summary

The package [broom]() provides three key functions:

Make sure to have a read of the conventions that David Robinson has outlined

tidy should be pretty straightforward, just a bit of a clean up on the existing methods in extract_mc_result...sorta. Currently it looks like:

n_added distance_within n_cov pct_cov n_not_cov pct_not_cov dist_avg dist_sd total_cost install_cost cost_relocate n_proposed_chosen n_existing_removed
0 100 339 0.1868798 1475 0.8131202 1400.192 1596.6756 NA NA NA NA NA
71 100 693 0.3820287 1121 0.6179713 560.345 719.4681 6e+05 5000 200 103 2

glance should just include

augment - perhaps this could add columnar information about whether the original user is covered by a facility under the new model, and distance to the nearest new facility.

One thing that I need to do is record the length of time for the model to be fit.