ropensci-archive / bomrang

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

Lat/Lon values are rounded in get_current_weather() results #50

Closed adamhsparks closed 7 years ago

adamhsparks commented 7 years ago

w <- get_current_weather("castlema") cbind (w$lat, w$lon)


#       [,1]  [,2]
# [1,] -37.1 144.2
# [2,] -37.1 144.2
# [3,] -37.1 144.2 
`
and yet,

```r
w <- get_current_weather(latlon = c (-37, 144))
# Using station_name = 'CASTLEMAINE PRISON', at latitude = -37.0809, longitude =
#    144.2392
`
Why are the locations rounded in the data.frame? Surely it would be better to keep the full values?

Insert the LAT/LON values from the JSONurl_site_list.rda and return these results to the user rather than the LAT/LON values from the json file?

adamhsparks commented 7 years ago

@HughParsonage, can you take the lat/lon values from our internal db and return those to the user?

I've hacked at it a bit this morning, but I'm not as familiar with data.table as you are, so it might be ugly compared to what you can do.

adamhsparks commented 7 years ago

Figured out how to do it while the object was still in a list format before converting to data.table

Passes tests, seems good. I've updated examples in documentation to reflect new values.