[TriPython] Prediction Model. Data Visualization.

David Burton ncdave4life at gmail.com
Tue Oct 10 23:13:35 EDT 2017


Hi Art,

If you don't have a web site/server of your own to use, there are quite a
few image hosting services available. Here's a good article:
https://www.bleepingcomputer.com/forums/t/650637/photobucket-alternatives/
Here's another article:
https://www.ghacks.net/2017/07/02/photobucket-alternatives-for-third-party/

For visualization, on my sealevel.info site I use Google Charts
(javascript). It's really quite nice. Here are some examples:
https://www.sealevel.info/boxcar_weights_graph.html
http://www.sealevel.info/co2_and_ch4.html
https://www.sealevel.info/MSL_graph.php?id=Honolulu
http://www.sealevel.info/MSL_graph.php?id=Honolulu&xtraseg=
2&g_date=1900/1-2099/12&x_date=2017/10-2099/12&x1=0.041&
x2=3.089&xslope=2.000

It's all done in javascript, within your web browser. You can hover the
mouse cursor over the graphs to see values, and pick options to change the
graphs, all without hitting the server. In fact, just to verify that, I
brought up the Honolulu graph page and then disconnected my Internet, and
tried changing various options in the graphs. It worked fine.

in fact, if you bookmark the "downloadable, bookmarkable image" ink in
those Honolulu graphs (in Chrome or Firefox) you're actually saving an
entire copy of the graph within the bookmark, in "data:image/png;base64"
form, so you can open that bookmark with no Internet connection.

The thing that was hardest to do on my pages was the "watermark." Google
Charts doesn't have an option to set the graph background. So my watermark
is really a background image *behind* the chart, which is initially covered
up by a solid white image. When Google Charts fills in the graph, it
deletes the solid white image which was in the DIV, and replaces it with
the graph. I gave the graph a transparent background, so when the white
image disappears that makes the watermark beneath it appear simultaneously
with the graph.

There are, of course, many other visualization packages out there. When I
was trying to decide which package to use, not quite two years ago, the
other one which was frequently recommended was D3. But it sounds like it
has a steeper learning curve than Google Charts.

This is an excerpt from a Jan 3, 2016 email that I wrote, when I was trying
to decide what package to use:

plot.ly turns out to be very not-free (though the javascript foundation for
> it is).  But there are lots of alternatives...
>
> "gnu plot" vs "google charts" vs CanvasJS vs D3.js vs Matplotlib vs flot
> or Flotr2 vs amcharts vs "highcharts js"
> Etc.
> http://stackoverflow.com/questions/52652/pretty-graphs-
> and-charts-in-python
> http://swizec.com/blog/flotr2-my-favorite-javascript-graph-
> library/swizec/4558
> https://www.reddit.com/r/programming/comments/c8h5a/
> have_you_used_the_google_charts_api_yet_it_is/
> http://sealevel.info/peterschlamp/drawcharttest.html  (was
> http://peterschlamp.com/js/drawcharttest.html
> <http://web.archive.org/web/*/http://peterschlamp.com/js/drawcharttest.html>
> )
> http://sami.salkosuo.net/out-google-charts-in-amcharts/
> https://en.wikipedia.org/wiki/Comparison_of_JavaScript_charting_frameworks
> https://plot.ly/javascript/
>

A few weeks later I attended an Analytics / Data Science meetup
<http://www.meetup.com/ac-rdu/events/227317630/> featuring a distinguished
panel of data science experts. There were a *lot* of people there! At the
end of the event I raised my hand and asked the panel for a recommendation
for data visualization. They all just kind of looked at each other. I don't
know whether they were thinking, "what a dumb question," or "gee, I don't
know." Finally one of them said she uses D3.

I asked if D3 is a better choice than Google Charts, and, again, they all
looked kind of befuddled. Finally, one of them said that either should work
fine. But I remember thinking that D3 seemed to be the most common choice,
among that crowd.

In fact, it might have been the *only* thing that most of them had used. My
suspicion is that hardly anyone really knows the answer to questions like
mine, because hardly anyone uses *several* of these packages intensely
enough to really compare them.

Dave


On Tue, Oct 10, 2017 at 8:52 PM, Jeff Heard <jefferson.r.heard at gmail.com>
wrote:

>    I'd suggest you look at Seaborn. If you're dead-set on visualizing data
> in
>    javascript, it might well give you some inspiration to draw from,
>    otherwise it's a great Python solution for data
>    vis.**[1]https://seaborn.pydata.org/ . I'm not 100% sure what I'd
>    recommend given that much information. Also, it looks like the mailer
>    scrubbed the images. If you could host the originals somewhere
> (GitHub?),
>    it'd help understand what you did better to give a recommendation.
>    Are your model outputs continuous or discrete? I understand that you're
>    looking at "positive/negative" values, but decisions/classifications and
>    actual model output can be different. Plus the choice of a donut chart
> to
>    represent boolean values doesn't make a lot of sense to me, so I thought
>    that I maybe understood you wrong.
>    **
>    On Tue, Oct 10, 2017 at 3:53 PM, Art <[2]artem.nesterenko at gmail.com>
>    wrote:
>
>      ** **Good afternoon!
>      ** **I'm reaching out to you guys for a suggestion on the data
>      visualization.
>
*...[snip]*
-------------- next part --------------
   Hi Art,
   If you don't have a web site/server of your own to use, there are quite a
   few image hosting services available. Here's a good article:
   [1]https://www.bleepingcomputer.com/forums/t/650637/photobucket-alternatives/
   Here's another article:
   [2]https://www.ghacks.net/2017/07/02/photobucket-alternatives-for-third-party/
   For visualization, on my [3]sealevel.info site I use Google Charts
   (javascript). It's really quite nice. Here are some examples:
   [4]https://www.sealevel.info/boxcar_weights_graph.html
   [5]http://www.sealevel.info/co2_and_ch4.html
   [6]https://www.sealevel.info/MSL_graph.php?id=Honolulu
   [7]http://www.sealevel.info/MSL_graph.php?id=Honolulu&xtraseg=2&g_date=1900/1-2099/12&x_date=2017/10-2099/12&x1=0.041&x2=3.089&xslope=2.000
   It's all done in javascript, within your web browser. You can hover the
   mouse cursor over the graphs to see values, and pick options to change the
   graphs, all without hitting the server. In fact, just to verify that, I
   brought up the Honolulu graph page and then disconnected my Internet, and
   tried changing various options in the graphs. It worked fine.
   in fact, if you bookmark the "downloadable, bookmarkable image" ink in
   those Honolulu graphs (in Chrome or Firefox) you're actually saving an
   entire copy of the graph within the bookmark, in "data:image/png;base64"
   form, so you can open that bookmark with no Internet connection.
   The thing that was hardest to do on my pages was the "watermark." Google
   Charts doesn't have an option to set the graph background. So my watermark
   is really a background image**behind**the chart, which is initially
   covered up by a solid white image. When Google Charts fills in the graph,
   it deletes the solid white image which was in the DIV, and replaces it
   with the graph. I gave the graph a transparent background, so when the
   white image disappears that makes the watermark beneath it appear
   simultaneously with the graph.
   There are, of course, many other visualization packages out there. When I
   was trying to decide which package to use, not quite two years ago, the
   other one which was frequently recommended was D3. But it sounds like it
   has a steeper learning curve than Google Charts.
   This is an excerpt from a Jan 3, 2016 email that I wrote, when I was
   trying to decide what package to use:

     [8]plot.ly**turns out to be very not-free (though the javascript
     foundation for it is).** But there are lots of alternatives...
     "gnu plot" vs "google charts" vs CanvasJS vs D3.js vs Matplotlib vs flot
     or Flotr2 vs amcharts vs "highcharts js"
     Etc.
     [9]http://stackoverflow.com/questions/52652/pretty-graphs-and-charts-in-python
     [10]http://swizec.com/blog/flotr2-my-favorite-javascript-graph-library/swizec/4558
     [11]https://www.reddit.com/r/programming/comments/c8h5a/have_you_used_the_google_charts_api_yet_it_is/
     [12]http://sealevel.info/peterschlamp/drawcharttest.html**
     (was**[13]http://peterschlamp.com/js/drawcharttest.html)
     [14]http://sami.salkosuo.net/out-google-charts-in-amcharts/
     [15]https://en.wikipedia.org/wiki/Comparison_of_JavaScript_charting_frameworks
     [16]https://plot.ly/javascript/

   A few weeks later I attended an**[17]Analytics / Data Science
   meetup**featuring a distinguished panel of data science experts. There
   were a lot of people there! At**the end of the event I raised my hand and
   asked the panel for a recommendation for data visualization. They all just
   kind of looked at each other. I don't know whether they were thinking,
   "what a dumb question," or "gee, I don't know." Finally one of them said
   she uses D3.
   I asked if D3 is a better choice than Google Charts, and, again, they all
   looked kind of befuddled. Finally, one of them said that either should
   work fine. But I remember thinking that D3 seemed to be the most common
   choice, among that crowd.
   In fact, it might have been the only thing that most of them had used. My
   suspicion is that hardly anyone really knows the answer to questions like
   mine, because hardly anyone uses**several**of these packages intensely
   enough to really compare them.
   Dave
   On Tue, Oct 10, 2017 at 8:52 PM, Jeff Heard
   <[18]jefferson.r.heard at gmail.com> wrote:

     ** **I'd suggest you look at Seaborn. If you're dead-set on visualizing
     data in
     ** **javascript, it might well give you some inspiration to draw from,
     ** **otherwise it's a great Python solution for data
     ** **vis.**[1][19]https://seaborn.pydata.org/ . I'm not 100% sure what
     I'd
     ** **recommend given that much information. Also, it looks like the
     mailer
     ** **scrubbed the images. If you could host the originals somewhere
     (GitHub?),
     ** **it'd help understand what you did better to give a recommendation.
     ** **Are your model outputs continuous or discrete? I understand that
     you're
     ** **looking at "positive/negative" values, but
     decisions/classifications and
     ** **actual model output can be different. Plus the choice of a donut
     chart to
     ** **represent boolean values doesn't make a lot of sense to me, so I
     thought
     ** **that I maybe understood you wrong.
     ** ****
     ** **On Tue, Oct 10, 2017 at 3:53 PM, Art
     <[2][20]artem.nesterenko at gmail.com>
     ** **wrote:

     ** ** **** **Good afternoon!
     ** ** **** **I'm reaching out to you guys for a suggestion on the data
     ** ** **visualization.

   ...[snip]

References

   Visible links
   1. https://www.bleepingcomputer.com/forums/t/650637/photobucket-alternatives/
   2. https://www.ghacks.net/2017/07/02/photobucket-alternatives-for-third-party/
   3. http://sealevel.info/
   4. https://www.sealevel.info/boxcar_weights_graph.html
   5. http://www.sealevel.info/co2_and_ch4.html
   6. https://www.sealevel.info/MSL_graph.php?id=Honolulu
   7. http://www.sealevel.info/MSL_graph.php?id=Honolulu&xtraseg=2&g_date=1900/1-2099/12&x_date=2017/10-2099/12&x1=0.041&x2=3.089&xslope=2.000
   8. http://plot.ly/
   9. http://stackoverflow.com/questions/52652/pretty-graphs-and-charts-in-python
  10. http://swizec.com/blog/flotr2-my-favorite-javascript-graph-library/swizec/4558
  11. https://www.reddit.com/r/programming/comments/c8h5a/have_you_used_the_google_charts_api_yet_it_is/
  12. http://sealevel.info/peterschlamp/drawcharttest.html
  13. http://web.archive.org/web/*/http://peterschlamp.com/js/drawcharttest.html
  14. http://sami.salkosuo.net/out-google-charts-in-amcharts/
  15. https://en.wikipedia.org/wiki/Comparison_of_JavaScript_charting_frameworks
  16. https://plot.ly/javascript/
  17. http://www.meetup.com/ac-rdu/events/227317630/
  18. mailto:jefferson.r.heard at gmail.com
  19. https://seaborn.pydata.org/
  20. mailto:artem.nesterenko at gmail.com


More information about the TriZPUG mailing list