Closed adamhsparks closed 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.
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:
a new column, full_name
, that the station details and station site list both include for current observations and ag bulletins;
the name
from json file for the current observations; and
the station
from the ag bulletin, for the ag bulletin.
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.
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?
Sure I'll do that.
Cool, thanks Hugh.
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.
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 😞
No worries, I can fix it up. :)
@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.
Simplify the references to stations.