njtierney / ukpolice

:uk: :police_car: R package to pull police data from the uk police data repository :police_car: :uk:
http://ukpolice.njtierney.com/
Other
36 stars 9 forks source link

Incorporate NSE into `ukp_crime` similar to leaflet / plotly #18

Closed njtierney closed 5 years ago

njtierney commented 7 years ago

Moving on from https://github.com/njtierney/ukpolice/issues/16 what I want is for users to be able to write something like:

# intelligent guess at long and lat
ukp_crime(crime_data)
#> Assuming 'long' and 'lat' are longitude and latitude, respectively

# or if long and lat have different names, x and y
ukp_crime(crime_data,
          lat = ~x,
          lng = ~y)
njtierney commented 5 years ago

This issue doesn't fit with the package use anymore - it doesn't make sense to refer to bare variable names - the arguments lat and lng accept vectors of length one. They don't need to refer to a variable by its bare name.