It is currently March 29th, 2024, 4:56 am

7DayWeatherCom

Weather skins
TallShultzy
Posts: 62
Joined: March 30th, 2016, 5:02 pm

7DayWeatherCom

Post by TallShultzy »

I've enhanced Jmorley's Weather.com skin (only the Weather.com.ini) to include 7 day forecasts and the Location name, Admin District and Country.
7DayWeatherComUSA.png
Thanks to JSMorley for updating the @include files and providing the following information:

copy all the .inc files from that .zip into the @Resources folder of your skin.

ONE IMPORTANT NOTE!

The new approach of using the API for the weather.com JSON requires a change to how you access a particular location.

All of the location "codes", like USVA0944 or bbd510e73cb5870f973cea9253bb1f9bfe239a129dfc2b89589cbb6d2d46b4bc or 22308 and such are NO LONGER SUPPORTED.

The new approach requires that you provide a Latitude and Longitude in the WeatherComJSONVariables.inc file. See that file for details on how you can get that for your location.

Please read WeatherCOMJSONVariables.inc carefully, it HAS changed.
You do not have the required permissions to view the files attached to this post.
Last edited by TallShultzy on August 1st, 2020, 12:01 pm, edited 3 times in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: 7DayWeatherCom

Post by jsmorley »

Very nice...

I'm currently working on extending WeatherComJSONMeasures.inc to be for the entire 15 days included in the JSON from the site, so you will have some further work in the next week or so... :p
TallShultzy
Posts: 62
Joined: March 30th, 2016, 5:02 pm

Re: 7DayWeatherCom

Post by TallShultzy »

Thanks but it's down to you really.

I might if there is enough demand.
The trouble is the skin would requires a bigger area the more you put on it.

PS how long does it take to upload the skin?
Last edited by TallShultzy on June 15th, 2020, 1:43 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: 7DayWeatherCom

Post by jsmorley »

The problem I found with including the location information in the display of the skin is one of real-estate.

There are three fields that are relevant, but not always.

1) The Display Name, which is most often the "city"
2) The Administrative Region, which in the US is important to get the "state", but my not be terribly interesting in other countries
3) The Country Name or Country Code

The problem is one how to best format and display

Fort Hunt, Virginia, United States of America
Birmingham, United Kingdom

Since in the first case, all three fields are of some interest, whereas in the second case, only the city and country are particularly relevant.
TallShultzy
Posts: 62
Joined: March 30th, 2016, 5:02 pm

Re: 7DayWeatherCom

Post by TallShultzy »

I suppose you could reduce United States of America to USA or even US.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: 7DayWeatherCom

Post by jsmorley »

TallShultzy wrote: June 15th, 2020, 1:44 pm I suppose you could reduce United States of America to USA or even US.
Yeah, but the real issue is detecting that it should use all three fields, or just two.

I'm no geography expert, but I expect that all three are of some interest in some other countries as well.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: 7DayWeatherCom

Post by jsmorley »

For instance, Birmingham doesn't even include any Administrative Region. It's just null.

I don't want to display Birmingham, , United Kingdom

On the other hand

Springfield, United States of America

Is really meaningless. There is a city or town of "Springfield" in probably every state in the union...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: 7DayWeatherCom

Post by jsmorley »

TallShultzy wrote: June 15th, 2020, 1:33 pm PS how long does it take to upload the skin?
Not sure I know what you mean. Upload it where?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: 7DayWeatherCom

Post by jsmorley »

Anyway, it all comes down to skin design. If you want to put in the effort, you could use IfMatch on the Administrative Region, and take some action if it is null. I was just explaining why I was hesitant to include it in my skin.

I just stuck it in the context menu:

Code: Select all

ContextTitle=[@LocationName], [@LocationAdminDistrict], [@LocationCountry]
ContextAction=https://www.google.com/maps/search/[@LocationLatitude],[@LocationLongitude]
Which is easy enough to edit if you want.
TallShultzy
Posts: 62
Joined: March 30th, 2016, 5:02 pm

Re: 7DayWeatherCom

Post by TallShultzy »

I wasn't sure whether the skin had to be vetted before it was released.
Is the Administrative Region the state in the US?
The "null" could be tested

The screen could show
Birmingham
United Kingdom
or
Birmingham
Alabama, USA