Create Graphs on Timeline card on Google Glass - google-glass

I am trying to create graphs on timecards, which can be shown on Google Glass. Wat would be the best way to go about this? I tried using d3.js, but was unsure how to integrate the library.
Any help would be highly appreciated

Since you cannot run JavaScript inside a card on Glass, d3.js probably isn't the best choice.
Seek out a graphing library that generates images. You can then attach or source those images into the timeline cards you create.

This is deprecated, but could work nicely for your use case: https://developers.google.com/chart/image/

Related

What is most optimal way to include data science visualizations and/or simple charts in django?

I am new in django, I have achieved to built a simple website up running in my local sever, but now I have reached that part where I want to add some cool and nice looking graphs to my project, but I see many options that are not that simple, if I could choose, I would use some python-based library or something, but it needs to load very fast. I am looking for guidance and suggestions. Thank you in advance.

Google Glass: Vignette for Videos?

Newbie here. I just wrote an app/Glassware for Glass using GDK and I want to show it to others by making a video vignette (overlay of video from camera and glass display). I know picture vignettes are possible:
https://support.google.com/glass/answer/3405215?hl=en
But there's no mention of vignettes for videos. Anybody know if this feature will be implemented soon or if it's possible to implement this myself? Sorry, this is not a direct programming question but I don't know where else to ask. Thanks!
Cliff
You can't do this at the moment, but you could technically take two video feeds and overlay them manually in an editor to get the same feeling. If you have questions like this you should really use the Google Glass Explorers Community Forum located here:
https://www.glass-community.com/

Building dashboards in django

I have a django app and I would like to display some graphical data visualization to my users. I am looking for an easy-to-use package that would allow me to add graphs and widgets.
The kind of widget I want to build is a kind of speedometer dial that is red at one end and green at the other. As a user completes their job over the day, the graphic/widget adjusts itself. The dial moves from red to green.
I also want an S-curve graphic that shows the cumulative amount of work accomplished against planned. That is kind of an x/y line plot.
My question are: How easy is this to implement? Are there any add-ins libraries or packages that do this already? I am trying to keep my entire application open-source. I've seen a couple subscription services that do this type of thing, but I can't stomach the cost.
I don't mind using ajax or jquery to implement such a thing, but I would like the most elegant and maintainable solution.
Any advice or examples on how to tackle this project?
There are lots of good javascript libraries these days, but all require some effort to learn how to use. I have not found one that really is easy to use, I guess because everyone wants something different. My general experience has been the more effort you put into learning them, the more you get out.
Google has gauges: http://code.google.com/apis/chart/interactive/docs/gallery/gauge.html
Also
http://www.flotcharts.org/
http://philogb.github.com/jit/
http://www.highcharts.com/
http://www.jqplot.com/
Or really take control:
http://mbostock.github.com/protovis/
As first, see the following grid (https://www.djangopackages.com/grids/g/dashboard-applications/) on djangopackages.
Not sure if that's exactly what's asked for, but you might take a look at django-dash (https://pypi.python.org/pypi/django-dash).
It allows each user to make his own dashboard (from plugins available). Those dashboards can be made public.
Some screenshots (http://pythonhosted.org/django-dash/#screenshots).
It's modular and plugin based, so you need to make a plugin and widgets for every specific feature (in this particular case - the speedometer plugin and widgets for it). Each plugin/widget can include own JS/CSS when being rendered.
See the following chart usage examples:
D3.js integration examples (https://github.com/barseghyanartur/django-dash/tree/master/example/example/d3_samples).
Polychart2.js integration example (https://github.com/barseghyanartur/django-dash/blob/master/example/example/bar/).
protovis is no longer under active development, but they started a new poject: http://d3js.org/
You may choose from these packages:
https://www.djangopackages.com/search/?q=dash

Interactive Graphviz graphs in a web application

I am trying to make a few interactive graph visualisations in my Django web application using Python. I found Graphviz and was able to output a static graph (as a .png image) on my application using Pydot (Python interface to Graphviz's dot language).
However, I am looking to make my graphs more interactive, like being able to highlight nodes when passing my mouse over it, making the nodes click-able, dragging the nodes to a different location and zooming on the graph.
Is there a way I could do this in Graphviz? Or in general is there way to make an interactive graph for my Django application without having to use Flash? I don't want to use flash since I'm not that familiar with it and also since I want to visualise a fairly large dataset.
Try The Javascript Infovis Toolkit. It is all implemented in a browser canvas, so no Flash is needed, only a decent browser with support for the <canvas> tag. Graph visualization examples are here, here and here, other demos are here.
There is Canviz (source). However, nodes are not yet clickable (they were in an older version that used image maps. The code base has changed and now the rendering is happenning client side using javascript, which is why clickable links is not yet re enabled.
This is the best I found, however they are plenty of others.
mxGraph (Not free)
You can use D3.js for graph visualization (see here for examples of graph visualizations in D3js, and look at How to Make an Interactive Network Visualization).
For back-end (if it is necessary to have something more than just a json file to represent the graph - i.e. if it is large), then you can use a Python module for graphs, NetworkX.
Side note, here is my simple interactive graph visualization example:
You can do something like this very simply just with DOT and HTML.
Generate client-side maps and overlay them over your PNG images. (Insert the map code into the HTML page.)
dot test.dot -Tpng -o test.png -Tcmapx -o test.map
SVG exports are directly clickable.
It seems like an approach that fits what you are trying to do might be to use svg in the browser an/or javascript. I think most of the modern browsers support SVG and would allow you to do some pretty cool interactive graphs. The server could provide a json feed of the datapoints needed to render the graph. I don't know off hand the tools that are available, but I've seen some pretty cool graph demos constructed without flash through client-side approaches.
As an alternative, you could pre-render a bunch of graph images that the user would likely view and then just fetch those as the user interacts with the graph. This might work if the graphs don't change that frequently and if the number of alterations that the user would make is small, but you'd have to re-render every time the graph changes.
I've did what you are trying to do not too long ago. The context was visualizing a gnarly SalesForce schema.
First thing, graphviz is only good for plotting, not really for drawing. You can generate SVG, but I could not get it to work with I.E. after a considerable of (what turned out to be fruitless) effort.
I DID find this Java Applet ZGRViewer to suffice, and while applets feel a bit dated for my taste, it worked very well cross browser.
I basically hand coded a process invoking service that generated the dot files and ran them thought (dotty, is think?) - the visulazation applet reads the native dot file format.
I also came accross something that I thought about for a V2 (which never happened) - it is part of the AJAX control toolkit - Seadragon.
If you want to see the code in ASP.NET, I can post it.

Vector or diagram drawing webservice

I have a webapp from which I'd like to insert diagrams and images quickly and easily. I expect there is, somewhere out there, a webservice which will take a URL with a parameter that describes the vector graphics or diagram and returns an image.
No unlike what google charts does for graphing data.
Any resources or ideas on this?
If I had to build it myself, do you have some ideas of how I might accomplish that?
For instance, does PHP/asp/etc have a graphics library that's capable of rendering simple vector graphics?
-Adam
Check out Raphael. Done by a bloke here in Australia.
No unlike what google charts does for graphing data.
Why not just use the Google Chart API?
http://code.google.com/apis/chart/
Have you considered something like http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm to produce actual vector graphics on the client side, instead of making requests to a server?
One possibility would be to generate SVG in realtime in the browser. This decreases browser compatibility, but that will decrease over time.