Re: kweather does not update weather data [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Jan 2021 09:31:27 +0100
deloptes <deloptes@xxxxxxxxx> wrote:

> E. Liddell wrote:
> 
> > The list of provinces/territories is correct, but there are ~700 Canadian
> > weather stations on the list, and some of them are going to be difficult
> > to place.  None of them use the "state" field, although some of them
> > annotate the "city" field with a province.  Some may have to be tracked
> > down using the latitude and longitude given.
> 
> yeah ... now everybody understands why there were not enough stations to
> select in the GUI and perhaps you understand why I'm asking here for help.
> 
> It is quite of effort to work all these out ... and the 700 are only in
> Canada ... what about the rest of the world?

What can I say?  Canada is the second-largest country in the world.  We have
vast tracts of thinly populated land (and vast tracts of largely unpopulated land
too), and weather stations are sprinkled all across that.

In a lot of cases, though, a breakdown by country is going to be sufficient.  A
small African nation might have 20 stations or so, which isn't too much for one
list.

> There are 6702 in the file from which 2590 are already done because they are
> are in the US.
> A big portion of the rest is just countries (like Europe etc)
> Africa, Russia, Mexico are good candidates.
> 
> I could easily map everything from Canada to one country Canada, but it will
> be difficult to find the right station. What do you think

For the Canadian stations specifically, it should be possible to allocate a lot of
them to provinces based on the annotations at the end of the "city" field, which 
are mostly the old conventional provincial abbreviations that everyone except 
the post office actually uses:

N. S. = Nova Scotia
N. B. = New Brunswick
PEI = Prince Edward Island
Nfld = Newfoundland
Que. = Quebec
Ont. = Ontario
Man. = Manitoba
Sask. = Saskatchewan
Alta. = Alberta
B. C. = British Columbia
N. W. T. = North-West Territories
Y. T. = Yukon Territory

There's some variation in capitalization and punctuation, and locations in Nunavut 
are likely to marked as being in the NWT for historical reasons, but it's a start and
should be able to assign most stations in the more populated areas to a province 
using a few regular expressions for matching.

Some of them can also be assigned automatically based on latitude/longitude
ranges (north of a certain latitude mostly places things in the Territories, south 
of it in the provinces, and Québec and provinces westward *almost* adhere
to specific longitudes, although there are some ambiguous zones—I'll see if I 
can get some numbers tonight).

The rest of them can be dropped in a bin labelled "Canada - Unknown" or the
like and assigned whenever someone figures out where they are.  (If we can
find a way of making these assignments easy for a non-technical person to do,
it might be helpful.)

This is mainly a concern for really large countries (Canada, U.S., Russia), where
if you pick the wrong weather station by mistake, you could be getting forecasts
for the other side of the continent.

E. Liddell
____________________________________________________
tde-users mailing list -- users@xxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxx
Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@xxxxxxxxxxxxxxxxxx




[Index of Archives]     [Trinity Devel]     [KDE]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux