njtierney / maxcovr

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

Follow up questions regarding maxcovr package #72

Closed statslady closed 6 years ago

statslady commented 6 years ago

Hi,

I came across your article on the above that sparked my interest.

Here is the link that I looked at: http://maxcovr.njtierney.com/

I have a question about the article.

How did you get that diagram to show up with the map? Which tool was used?

Also, I am not sure I follow this comment: 'This tells us that out of all the crime, 18.68% of it is within 100m, 339 crimes are covered, but the mean distance to the surveillance camera is 1400m". What would be the implication of the mean distance being 1400m?The average distance from the existing buildings to the surveillance camera? I guess I am not following the context.

Also, can this example be applicable to a usecase related to opening new retail stores in a certain geographic area?

When will this package be made available in CRAN?

Thanks much! Indu

njtierney commented 6 years ago

Hello! :)

How did you get that diagram to show up with the map? Which tool was used?

This was created using the leaflet library - you can see the code to create everything here in the README.Rmd file.

Also, I am not sure I follow this comment: 'This tells us that out of all the crime, 18.68% of it is within 100m, 339 crimes are covered, but the mean distance to the surveillance camera is 1400m". What would be the implication of the mean distance being 1400m?The average distance from the existing buildings to the surveillance camera? I guess I am not following the context.

This is generated from the code here:

coverage(york_selected, york_crime)
#> # A tibble: 1 x 7
#>   distance_within n_cov n_not_cov pct_cov pct_not_cov dist_avg dist_sd
#>             <dbl> <int>     <int>   <dbl>       <dbl>    <dbl>   <dbl>
#> 1             100   339      1475   0.187       0.813    1400.   1597.

The mean distance here refers to the nearest of the york_selected TO the york_crime.

Another way to think of this is that to get this summary, we calculate the nearest from york_selected to york_crime, so we now have a data.frame of york_crime, with an extra column of the distance to the nearest york_selected.

In this instance, the mean distance to a surveillance camera from a crime.

Also, can this example be applicable to a usecase related to opening new retail stores in a certain geographic area?

In some sense, yes, but not fully. The maximal covering location problem refers to finding the location that maxmise the coverage of a location on some targets. You could then try and place a retail store to maximise its coverage on nearby buildings. However, there are other features that you would probably want to consider for a building - such as the cost of the land, how accessible it is, and so on. These features are not considered in maxcovr.

When will this package be made available in CRAN?

Possibly by the end of the year, but most likely sometime between March and April next year.

Thanks for your questions!