Author Topic: Scripts to Display CDC Influenza Maps  (Read 6852 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #50 on: January 26, 2016, 02:15:18 PM »
I didn't quite finish the fixes to 'inc-flumap.php' on the 23rd. :oops:  The current version will correctly display this year's map on initial page load.  You can get the newly revised 'inc-wxflumap.php'  here. (Save as usual.)
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline Breezy

  • Indian Trail Weather
  • Senior Contributor
  • ****
  • Posts: 227
    • Indian Trail Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #51 on: January 26, 2016, 04:07:03 PM »
Jerry,

Got it !!! Thanks.   \:D/

Jeff

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #52 on: January 30, 2016, 12:09:52 AM »
There were more problems with these maps today. :-( The current week's map didn't have a link so it obviously wasn't displaying on mouseover.  This has been corrected in today's version.  The only modifications were to 'inc-flumaps.php', but I've updated the version on all three scripts to today's date for consistency's sake.  Here is the current script's output.

Current Flu Season Scripts Version 20160129:
  wxflumap.php
  flumap-select.php
  inc-flumap.php

The Past Flu Season Scripts are unchanged from Oct. 2015
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline Breezy

  • Indian Trail Weather
  • Senior Contributor
  • ****
  • Posts: 227
    • Indian Trail Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #53 on: January 31, 2016, 08:48:28 AM »
Jerry, Thanks. Updated ...  :-)

Jeff

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #54 on: April 22, 2017, 09:46:46 AM »
There was a huge change in the CDC's Flu Map script and presentation this week!  The current maps are no longer available in the same format because they've scripted the map with 'hover' changes and a slideshow of the current year with individual maps selectable at random.  It's a significant improvement over their old presentation, and better achieves what I was attempting with my 'Current Season' script.  Kudos to them!

BUT, their scripters didn't quite realize how past flu maps weren't regularly named, so their past season presentation isn't quite ready for prime time--it hangs, for me anyway.

I don't think I need to continue with my version of the 'Current Season', so I've merely linked to the CDC's page in my menu.  However I think there's still some merit in keeping my 'Past Seasons' in the mix, so it remains in my menu until the CDC sorts out the problems with their new presentation.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #55 on: April 23, 2017, 09:03:00 AM »
Today the historical flu seasons are working on the CDC's site!  With that, my menu links only to their site for flu maps.  I really like what the CDC has done with these maps. =D> \:D/ =D>
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 7926
    • Meteotemplate
Re: Scripts to Display CDC Influenza Maps
« Reply #56 on: April 23, 2017, 09:07:52 AM »
Hi,
you could use the XML feeds, I used that on my page and they (fortunately) didnt change that
http://www.meteotemplate.com/template/plugins/fluUS/
https://www.cdc.gov/flu/weekly/flureport.xml

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #57 on: April 23, 2017, 10:08:40 AM »
Hi,
you could use the XML feeds, I used that on my page and they (fortunately) didnt change that
http://www.meteotemplate.com/template/plugins/fluUS/
https://www.cdc.gov/flu/weekly/flureport.xml
Looks great, Jachym!  I don't have much experience with XML feeds, so I'm not sure how to go about that.  Also, the past seasons are nice for comparison purposes.  Thinking about their presentation, it isn't that easy to compare week-by-week with a 'hover' like it is with my presentation.  I think I'll restore it as an alternative.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 7926
    • Meteotemplate
Re: Scripts to Display CDC Influenza Maps
« Reply #58 on: April 23, 2017, 10:26:14 AM »
LOL, I can help you with XML, it is not that difficult to use in PHP and thanks for the idea, I might actually see if I can make some comparison scripts too using the XML feed

If you want to have a look at the code, you can download mine here:
http://www.meteotemplate.com/web/plugins.php

It is called "Flu U.S."

The advantage of using XML or JSON is always the fact it is less vulnerable to changes, these feeds are meant for use by others so they dont change them often (with the exception of NWS...) :D

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #59 on: April 23, 2017, 03:34:49 PM »
LOL, I can help you with XML, it is not that difficult to use in PHP and thanks for the idea, I might actually see if I can make some comparison scripts too using the XML feed

If you want to have a look at the code, you can download mine here:
http://www.meteotemplate.com/web/plugins.php

It is called "Flu U.S."

The advantage of using XML or JSON is always the fact it is less vulnerable to changes, these feeds are meant for use by others so they dont change them often (with the exception of NWS...) :D
I borrowed your code and adapted it to run in the Saratoga template.  The versatility of Highcharts is very impressive--downloading charts in different formats, even!  Thanks! \:D/
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 7926
    • Meteotemplate
Re: Scripts to Display CDC Influenza Maps
« Reply #60 on: April 23, 2017, 05:22:55 PM »
Yes, looks nice

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #61 on: April 23, 2017, 05:45:00 PM »
Yes, looks nice
Thanks, Jáchym, but you did all of the heavy lifting.  I just provided a framework.  It also occurred to me that I hadn't properly credited you for your fine work.  Corrected.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 7926
    • Meteotemplate
Re: Scripts to Display CDC Influenza Maps
« Reply #62 on: April 23, 2017, 05:47:34 PM »
NP, and thanks, it is always great to see how people co-operate here


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1715
    • SouthEast Lincoln, NE Weather
Re: Scripts to Display CDC Influenza Maps
« Reply #63 on: May 19, 2017, 11:44:57 PM »
Just a little tweak to the code today...I rotated the array so that the latest week will be the default, like here.  I've been a little brain dead since I've been building my own server for the past couple of weeks with a Lenovo server (open box from Newegg at half price) on Linux Debian.  Lots and lots of issues, and it's not secured with SSL yet.  Doing things like trying to serve multiple secure domains from one IP address by using nginx as a reverse-proxy to apache2 on the server and to another box here (believe it or not, a Raspberry Pi!) that hosts a different site.  The site mirrors and will eventually replace my GoDaddy server. With a theoretical 1GB bandwidth up and down on my fiber connection, why not?  Plus it's a real learning experience!!! ](*,) #-o :shock: :lol:

The modified 'flu-main' code.

Thanks again, Jáchym!
« Last Edit: May 19, 2017, 11:46:29 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@inebraska.com