ropensci-archive / bomrang

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

nomenclature for the names of weather stations #27

Closed adamhsparks closed 7 years ago

adamhsparks commented 7 years ago
names (stations_site_list) # it's called "name"
names (get_current_weather("castle"))
# it's called "name", but the `Warning` refers to `station_name`
names (get_precis_forecast(state = "vic")) # it's called "location"

Simplify the references to stations.

HughParsonage commented 7 years ago

I think these are intentionally separate, though. Note that name is the column identifier that's returned by BoM, so we probably shouldn't change it. However, my choice of station_name, rather than name as the argument was deliberate: location isn't quite good enough, because the match is done on the station name not on the locality; and name I felt wasn't as clear as station_name for the user. (It be read as referring to a observation area, or a suburb.)

For the forecasts, the location isn't the same thing as name: it's the locality, not the weather station, that the forecast is referring to in that table.

Ideally the Bureau would have used station_name in the JSON, but it didn't.

adamhsparks commented 7 years ago

I'm looking at these a bit more tonight. What a mess, eh?

BoM uses "name" in two ways and refers to the same thing also as "station".

http://www.bom.gov.au/products/IDN60801/IDN60801.94596.shtml - Up at the top "name" is used as "Ballina" and in the station details, Station Details ID: 058198 Name: BALLINA AIRPORT AWS Lat: -28.84 Lon: 153.56 Height: 1.3 m

But in the json file name is referred to only as "Ballina".

In the site list file that we've downloaded it's the full name "BALLINA AIRPORT AWS".

In the ag bulletin they are referred to as "station", ftp://ftp.bom.gov.au/anon/gen/fwo/IDQ60604.xml

I'd advocate for having a standardised nomenclature here that includes:

I've tried to be as clear on the subject as I think I can be given the mess that seems to be how the same item is referred to by BoM.

adamhsparks commented 7 years ago

I've added full_name to the ag bulletin output, checking there are differences in the names between the name and full name from the stations site list.

I'll add a full_name column to the get_current_weather output as well unless you'd like to, @HughParsonage?

HughParsonage commented 7 years ago

Sure I'll do that.

adamhsparks commented 7 years ago

Cool, thanks Hugh.

adamhsparks commented 7 years ago

Maybe I wasn't clear enough. I think we should have two values?

BoM refers to a name in the report but also has a longer name in the station list that can distinguish between the current and previous locations that use the same name in the report, if I understand @mpadge correctly.

HughParsonage commented 7 years ago

Hmm I still don't understand. Happy to do work, but not if it creates work for you! If you create a test that breaks the build, that's probably enough to clarify -- and I'll fix it. Otherwise, feel free to just make the change yourself. Sorry 😞

adamhsparks commented 7 years ago

No worries, I can fix it up. :)

adamhsparks commented 7 years ago

@HughParsonage I think this was my mistake.

What's been done here seems good. If the station name specified by the user matches what's in the stations list we've created then it should be OK. I think this only applies to the ag bulletin where BOM issues the bulletin with a "name" that may or may not be the "full name" due to stations retiring or other reasons.

Using "full_name" does mean that in output from get_current_weather() and from get_ag_bulletin() the stations can be identified and the naming is consistent across the functions. Prior where I only used the name coming from the ag bulletin XML there could be confusion.