ropensci-archive / bomrang

:warning: ARCHIVED :warning: Australian government Bureau of Meteorology (BOM) data client for R
Other
109 stars 26 forks source link

Fuzzy matching is inconsistent in get_current_weather() #44

Closed adamhsparks closed 7 years ago

adamhsparks commented 7 years ago

No warning is generated for

w <- get_current_weather("castlemaine")
w <- get_current_weather("castlema")

yet one is nevertheless generated for the unambiguous

w <- get_current_weather("castlem")

Then note that,

w <- get_current_weather("castlema")
w$name [1]
# [1] "Castlemaine"

and yet the warning told me station_name = 'CASTLEMAINE PRISON'. I think there needs to be more consistency in handling the names of observation stations and what they are referred to in the data.frame objects, and personally suspect that the full names ought to be used at all times - so this ought to be "CASTLEMAINE PRISON" at all times. This is likely to be particularly important because many stations within a given town/city/area have changed location over time, and second denominators often serve to clarify which station is being used. ("CASTLEMAINE PRISON" is, for example, relatively new, with previous observations at "CASTLEMAINE" actually taken at a different location.)

From: https://github.com/ropensci/onboarding/issues/121

HughParsonage commented 7 years ago

Wow. This is a really excellent bug report -- I never would have picked it out.