I'm trying to plot certain medical facilities within a 25-mile radius of a certain geocoded point. :
Dataset of facilities looks like this:
Name Lat Long Type Color
A 42.09336 -76.79659 X green
B 43.75840 -74.25250 X green
C 43.16816 -77.60332 Y blue
...
The list of facilities, however, spans all across the country (USA), but I only want to plot the facilities that are present within the circle. The center of the buffer circle is the set of coordinates (long =-73.857932, lat = 41.514096)
and radius 25 miles
.
So in the dataset that I would need to plot, I need to filter the list of facilities, their latitude and longitude, type and color
I'm really new at this and running a tight deadline so if someone could explain that would be great.
PS: I also want to count the type of facility (but I guess that would be a simple dplyr %>% n() once the filter is created, right?)