Author Topic: Hourly Temperature Chart  (Read 9802 times)

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Hourly Temperature Chart
« on: March 02, 2005, 10:30:57 AM »
I think it is a time that I should put together a simple instruction for the set-up(or explanation) the parameters in the url.  If you would like to know “evolution” of this idea, please read the thread.

The basic url address is:
Code: [Select]
http://tpfans.com/rss/TpHourChart.php?Citycode=Citycode&Para=x,y,width,height

The following parameters are “required”.

Citycode: Well, it is the citycode you got from weather.com.  For example: USMD0347.

Para:         There are 4 numbers separated by “,”.
           x: horizontal offset of the chart
           y: vertical offset of the chart

           width: the width of the chart
           height: the height of the chart

   If you have the temperature label for the y-axis, you can adjust the “x” to accommodate different font sizes.  To accommodate the label at x-axis, I added “25” pixels of the height to the image.  The same “25” pixels also was added in the width.  So the size of the image should be: (“x+width+25” x “y+height+25”).  

   Example, “Para=20,20,250,150” will give you a chart with (250 x 150) start at (20,20) and the size of output image is (20+270+25) x (20+150+25) = 315 x 195.  Please adjust the size according to your device (QVGA or VGA) and desired display area.

Option parameters
   The follow ones are optional.  You don’t have to specify it if you are happy with the default settings.


U: unit of temperature, F: Fahrenheit, this is default; C: Celsius.

W: This one to specify the “window” you wish to have label in the x-axis.  If you set “W=5”, then the hour label will start at the “first” one and every 5 hour.  For example, if you update at 8:00 and “W=5”, then you should see (9,14,19……) at x-axis. The day of week will be shown under “0”. The defaul setting is "2".

Time: This one is to specify the “exact” hour you wish to show at x-axis. The “0” will be displayed as “24” on the chart.  For example “Time =0,6,12,18” will give you label when the hour is 24, 6, 12, or 18.  In this option, no day of week will be shown.

Color:  You can specify the colors using the following parameters.
F_Color: Specify the RGB color of the frame. Default: 15,196,15
T_Color: Specify the RGB color of the Temperature line. Default: 196,15,15
R_Color: Specify the RGB color of the Real(or feel-like) Temperature line. Default: 15,15,196
L_Color: Specify the RGB color of the label. Default: 0,0,0

Font size:  The font size of the labels can be specified.
XFont: The support sizes are 1-5. Default:1
YFont: The support sizes are 1-5. Default:1

Real(Feel-like) Temperature
Ftemp: To not show the real(feel-like) temperature, use "Ftemp=N".  The default is "Y".

Y-Axis grid lines
YS: To specify  the numbers of grid lines, use "YS=number".  The default is "5".

Example: http://tpfans.com/rss/TpHourChart.php?Citycode=NLXX0019&Para=25,0,175,75&U=C&Time=0,6,12,18&Font=2&R_Color=150,196,254&T_Color=196,15,15&La_Color=15,15,140&F_Color=0,155,0

Download

The output image format is PNG with transparent background.  Add url and file pathway into your radar.txt.  Here is an example:

Code: [Select]
SURL=http://tpfans.com/rss/TpHourChart.php?Citycode=GMXX0039&Para=20,20,200,120&U=C
STOR=\My Documents\Radar\r1.png
FORM=

ZapMe1

  • TodayPlus Veteran
  • *****
  • Posts: 551
Hourly Temperature Chart
« Reply #1 on: March 02, 2005, 11:09:11 AM »
UK,

Once again, "Simply Amazing Work"

Another Great Job !!!   :clap:
ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Hourly Temperature Chart
« Reply #2 on: June 17, 2005, 01:57:53 AM »
Hi uk_skinner,

having problems with the script since yesterday.

Code: [Select]
Warning: is_nan() expects parameter 1 to be double, string given in /home/tpfansc/public_html/rss/TpHourChart.php on line 191

Warning: Cannot modify header information - headers already sent by (output started at /home/tpfansc/public_html/rss/TpHourChart.php:191) in /home/tpfansc/public_html/rss/TpHourChart.php on line 238
‰PNG  IHDRán#{iDPLTEÿÿÿŒ–ÄþÄ›ý³SÁtRNS@æØfŽIDATxœíš Žã †MéàU´ˆ” ڝûŸiáaójÍŒ°:ª›¿Cp Øýë3öÊîä™÷lñ¶x{Lb`L‚”b˜è¼¢!`Tã²ä^•¨˜R°êo¨­™–©f¹‘Ïò‡oÆž¼ FæoHãmyXâJ]H„Èà"lÖ:ˆö¨Žùf®#lk;QÝltäè ‚%C!Z"špãÞû(ñf†Œ'®—á⦆ªóWÀÃz21RÅ?OLhXÏ%®åßQÝŒƒ÷cª +B4ÙjhÎɍD;ÏõsI؅ĈÌ|úSÕöLð­9[‰ì:Ú¹K×6b˜gñ–ñ4‘WQ?N"ÒAÃªzÖBäQf¯¶ZêÍÖF «"KÄ Šv¢NUÑ,5×O„*Q¥*Æb, kaàDU´‡!ɏ1 k™È£q‡“µ•"F è™ç),+!UŒƒE´îHEávIc< D¯tÒÖ°N2G"D5Nƒ‘óþ#ÍWˆæ„¨S•»;°$4D<rB´æ‰é‰<¬…yÜ8òùIÄ2°‡¨ 5Ä°2T!z.+ñΧG«A¬LÄ;ßr‡ŽÉg·”Ø#qXŸiûˆÂî’‹É…ì *:ËU÷¬bUÕ{£JÔ;¬¼~ŒÄ÷•ˆjmmõÏ/£xà·}b¾¶"D–V]/'櫹ÄÜØ!w¦ºˆz'°FOìÃáDke¢Eõ†ô-bm {6‚¬þk‰{zíê/x77Fo¼·"2ìç|”(´Æ«£Z}ou¯e¥zü«å½U µÇ}‘n‰ø‚×¹Ø±¶ÓtT¯#º÷V—ÿ—|HcÉ®';}¬~Câ´iC¦ž•¥È\i߉øiaöLÍAiÿÃÀý¨™TÅYêêop²²lŸšw¶J·®„ïeA"óm2vÀõö¤«-²â ¾[›t®„<Ú ‚¦Zñ J‰”=¢ª;牲E$º¼Fñ” 4Š€Ø¢’AÐ ¯¡%8 1ì†på1öšˆ,tÝÈ@5ú²áȉ£TJéÔèoÛYsÈsd^Ö&u뜖ë8mÚ´iÓ¦M»ÜþSë"ü6fIEND®B`‚


Any idea, what causes this ?

Regards Broesel

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Hourly Temperature Chart
« Reply #3 on: June 17, 2005, 08:33:18 AM »
Quote from: "Broesel"
Hi uk_skinner,

having problems with the script since yesterday.

Code: [Select]
Warning: is_nan() expects parameter 1 to be double, string given in /home/tpfansc/public_html/rss/TpHourChart.php on line 191

Warning: Cannot modify header information - headers already sent by (output started at /home/tpfansc/public_html/rss/TpHourChart.php:191) in /home/tpfansc/public_html/rss/TpHourChart.php on line 238
‰PNG  IHDRán#{iDPLTEÿÿÿŒ–ÄþÄ›ý³SÁtRNS@æØfŽIDATxœíš Žã †MéàU´ˆ” ڝûŸiáaójÍŒ°:ª›¿Cp Øýë3öÊîä™÷lñ¶x{Lb`L‚”b˜è¼¢!`Tã²ä^•¨˜R°êo¨­™–©f¹‘Ïò‡oÆž¼ FæoHãmyXâJ]H„Èà"lÖ:ˆö¨Žùf®#lk;QÝltäè ‚%C!Z"špãÞû(ñf†Œ'®—á⦆ªóWÀÃz21RÅ?OLhXÏ%®åßQÝŒƒ÷cª +B4ÙjhÎɍD;ÏõsI؅ĈÌ|úSÕöLð­9[‰ì:Ú¹K×6b˜gñ–ñ4‘WQ?N"ÒAÃªzÖBäQf¯¶ZêÍÖF «"KÄ Šv¢NUÑ,5×O„*Q¥*Æb, kaàDU´‡!ɏ1 k™È£q‡“µ•"F è™ç),+!UŒƒE´îHEávIc< D¯tÒÖ°N2G"D5Nƒ‘óþ#ÍWˆæ„¨S•»;°$4D<rB´æ‰é‰<¬…yÜ8òùIÄ2°‡¨ 5Ä°2T!z.+ñΧG«A¬LÄ;ßr‡ŽÉg·”Ø#qXŸiûˆÂî’‹É…ì *:ËU÷¬bUÕ{£JÔ;¬¼~ŒÄ÷•ˆjmmõÏ/£xà·}b¾¶"D–V]/'櫹ÄÜØ!w¦ºˆz'°FOìÃáDke¢Eõ†ô-bm {6‚¬þk‰{zíê/x77Fo¼·"2ìç|”(´Æ«£Z}ou¯e¥zü«å½U µÇ}‘n‰ø‚×¹Ø±¶ÓtT¯#º÷V—ÿ—|HcÉ®';}¬~Câ´iC¦ž•¥È\i߉øiaöLÍAiÿÃÀý¨™TÅYêêop²²lŸšw¶J·®„ïeA"óm2vÀõö¤«-²â ¾[›t®„<Ú ‚¦Zñ J‰”=¢ª;牲E$º¼Fñ” 4Š€Ø¢’AÐ ¯¡%8 1ì†på1öšˆ,tÝÈ@5ú²áȉ£TJéÔèoÛYsÈsd^Ö&u뜖ë8mÚ´iÓ¦M»ÜþSë"ü6fIEND®B`‚


Any idea, what causes this ?

Regards Broesel


Odd??  I will take a look.  I have not changed anything in the script.  Looks like the data format is changed.

Edit: Ok, fixed, can you try again?

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Hourly Temperature Chart
« Reply #4 on: June 17, 2005, 09:44:49 AM »
Quote from: "uk_skinner"

Odd??  I will take a look.  I have not changed anything in the script.  Looks like the data format is changed.

Edit: Ok, fixed, can you try again?


Yes, everything is fine again, thanks for the fast fix ....  :D

Regards Broesel