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

write S3 `summary.maxcovr()` and `print.maxcovr()` methods for `max_coverage()` #15

Closed njtierney closed 7 years ago

njtierney commented 7 years ago

Summary would return key information such as:

I would prefer that summary.maxcovr returned a dataframe.

Perhaps the print.maxcovr method would provide a "human readable" option.

njtierney commented 7 years ago

After some discussion with @noamross on the Slack, I'm going to go ahead with the following plan:

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.

njtierney commented 7 years ago

There are now print and summary methods for maxcovr.

Moving the broom::tidy focus into a separate issue.