Suggestions for a web-based streaming charting tool - streaming

Afternoon all,
I'm looking for a way of presenting near realtime data using line charts within my web application. Specifically, my requirements are as follows:
It should support zooming (with the mouse wheel too!), scrolling, selecting different time ranges, etc.
It should support presenting data at multiple resolutions within a single chart. The default view would be the past 24 hours (using data at one minute resolution), but if the user zoomed out or browsed back further in time then lower resolution data would be used. On the daily view, we'll have 1440 points per line (there'll be at least two). If we lower this to hourly averages when zoomed out further, we're looking at 720 points per month per line. We can lower the resolution further after that too.
Ideally, if the user zoomed into a historical date the graph would poll a server to see if high resolution data was available for that period, and if so, fetch it and update the graph area.
Streaming data support. Namely, the graph would fetch deltas every X minutes and append them to the graph.
We're open to using Flash, Java, Silverlight or pure Javascript for the presentation layer, although Flash would probably be the strongest preference.
I've spent a fair bit of time looking around for something that would fit the bill here and have (surprisingly) not found much. Here's some brief notes from my research:
a) Google Finance charts are pretty much exactly what I want to achieve, but it seems that their public version of these charts (the Annotated Timeline Chart) is comparatively very limited. It does not allow for streaming data, and if you want to redraw graph data (e.g. when changing the selected date range) you get a nasty flicker as the chart area reloads with the new data.
b) Timepedia Chronoscope charts sound promising at first glance, with support for incremental data loading. However, there seems to be no documentation or examples of this (all examples use a static dataset from .js files)
c) We've seen charts such as Open Flash Chart and others like this, but they don't have the "wow factor" that Google Finance charts do.
Any suggestions welcome!

I would suggest Highcharts - very neat SVG and javascript-based charts. There's also an example called Live Random Data which updates a spline ever second - this would be useful for your streaming requirements. The zooming and scrolling is available: Master Detail Chart, but everything depends on how much data you'll be pointing out.
In my experiments earlier this year, I managed to have around 20 graphs with over 40 plots each running smoothly in Firefox, but more than that could give out tiny delays, so in that sense yeah, you'll be better off with Flash, although I doubt that anybody would be able to read 20 splines at a time ;)
Hope that helped. Cheers!

Related

Is it possible to track the actual driven distance with the car in an Flutter App with Google Maps API?

So basically, I want to have a button where I can begin the tracking, and when I click the second time, the driven route should be displayed on the map and the driven distance (in kilometres) should be displayed.
I searched up the Internet but found no solution on that.
I would be happy if anyone could help me, thanks.
For as far as I'm concerned this can not be achieved via a Google Maps API.
Like Andy replied in a comment on your question, you can keep track of the coordinates from the Geolocator package (https://pub.dev/packages/geolocator) and compute the distance between each sequential point (Maps Toolkit provides these functions: https://pub.dev/packages/maps_toolkit).
Add these up and you have an approximation of the distance. How more often you keep track of the location, how more accurate it will be.
Keep in mind: if you track based on time, the approximation may be less accurate due the (higher) speed of the device that's travelling. I'd suggest you adjust the interval of point-tracking based on the speed.

OpenMapTiles Beginner questions

I'm looking to replace Google Maps by something self-hosted and free. After searching for some time I found OpenMapTiles. I'm very new to this stuff, so there are many things I don't understand, namely:
I'm not sure I qualify for pre-rendered tiles, can I generate my tiles myself from osm data?
I would like to have something like google terrain map, with contour lines, is that possible with OpenMapTiles?
I also have some GPS tracks that I would like to show like overlay over base maps (OSM or Google), and I want them clickable (clicking open a link or popup or something like that), is that possible?
Is OpenMapTiles server heavy to run?
Thanks
That's totally possible, I've done it myself. However, it takes a while to do everything.
1. Generate MBTiles
First of all, I'd suggest you start taking a look in the Github repo of OpenMapTiles: https://github.com/openmaptiles/openmaptiles
To generate an MBTiles file, for a country is quite manageable to do in your own computer. And basically you can do so by executing the main script with the name of the country as a parameter. Like this:
./quickstart.sh portugal
After the script creates a Docker machine, downloads the OpenStreetMap data for the country, processes it, and generates the MBTiles file, then you'll be done.
For me, with an average computer, for countries like Spain or Portugal, it takes about 4-12 hours to do so. But it really depends on the country. Norway takes forever (about 4 days), I believe due to its very long coastline.
If you want an MBTiles file that will work for the whole planet, then you need a more powerful computer, that specially has a big SSD and lots of RAM. Between 32 and 64 GB of RAM and 250-300 GB of SSD.
2. Set up a tile server
After that, you can use this project https://github.com/urbica/tessella to run your own tile server to be consumed form a website or mobile app.
The resources of the server will depend on the size of the MBTiles file you want to use in the server.
3. Enable contour lines
This is possible too, but a bit more trickier. I'd suggest you use Maptiler as a service for this.
Whenever I achieve this matter, I'll go back to you with the information.
If the tiles you generate don't contain the contour / elevation data, then styles won't help. The tiles from OpenMapTiles do not have the contours inside.
4. Web and mobile libraries (to display GPS tracks, waypoints, etc)
This is possible as well. What technology you want to use here?
For web apps:
There's a well established library, Leaflet: https://leafletjs.com
More recently, looks like MapLibre is taking the lead (fork from Mapbox GL JS): https://github.com/maplibre/maplibre-gl-js
For mobile apps:
VTM is an open source iOS and Android library: https://github.com/mapsforge/vtm
There's Carto, which is more recent but it has a great support: https://github.com/CartoDB/mobile-sdk
And MapLibre has a native Android and iOS library too: https://github.com/maplibre/maplibre-gl-native

Need help on tableau image carousel

I want to add an image carousel on a dashboard in Tableau. Around 3-4 images in slideshow from right to left. How does that work? Any insights would be helpful. Thanks!
Adding a picture slideshow in Tableau is not supported in a native way (purposely I assume) and I think there are several reasons you should reconsider your idea.
Tableau is a data visualisation tool and not PowerPoint. You should stick to visualising your data and not create a full on multi-media dashboard that distracts from the important points you want to present
If you need to display pictures that's fine (and possible) but having them changed independently of the data, doesn't seem to add any additional value to a dashboard and should be better done in a different place eg. the website you embed the dashboard in.
If you really want to have animations and moving parts in your dashboard and consider it a necessary feature to proof your point, the only way is to do what you already mentioned, create this slider in an external website and embed it in the dashboard. This however seems like a weird idea as well since if you do embed it in a website, it would be way easier to just do the slider there. If the dashboard is intended to be used locally however, you cannot guarantee that the user will have internet connection, which would mean that it cannot be consumed in a way you intended it to be consumed.

recognize a picture on the photo

My server receives photos from the client. The server is web-server in my case, but I don't mention any specific technology because I can choose any free technology that will provide me the solution. The photos are snapshots from the video streamed from the web-camera.
On some photos the server receives there is a colored picture
(always the same picture and the server has it in advance) on a
whitish background (wall).
Other photos may include any subjects on
any backgrounds.
I can't control the light in the room where the
pictures are made (it could be darker or lighter on different
photos).
When there is the picture in the photo - whole the picture is included in the photo (not just part)
of it.
When there is the picture in the photo - it takes a very significant part of the photo (i.e. the picture will be made close to the wall).
The picture on the photo could be a bit inclined/declined - let's say not more that 10°.
On the server side I should be able to decide (with a certain level of significance) whether the picture is in the photo.
I am looking for a quick and dirty solution for now (it's just POC). The library and the technology should be free.
I thought of using neutral network. In this case I could even "to train" the network off-line and once I have it tuned on I could use it on client side with javascript (the calculations shouldn't take a lot of time) without passing the photos to the server (that would be perfect).
Is there any ready solution for this problem?
Thanks a lot!
I think answers to this question: Looking for an Image Comparison/Pattern Recognition Library would be a good start.
I would certainly not constrain myself to neural networks. You will need some kind of classifier but I think it would be good to start thinking about how to extract features of the images. It may turn out to be a simple problem: e.g. distinguishing between a homogeneous whitish/grayish image (a wall) and a much more heterogeneous image - that is you compute just one feature - heterogeneity - and decide based on that. In that case maybe you even wouldn't need any special image recognition library.

Google Finance style time series chart

I need to plot time stamped sensor data on a chart. There would be 3000 to 15000 data points in a day and I am looking for an interactive chart that is easy to navigate. Google Finance chart widget is perfect for my requirement. It seems to intelligently load data as one scrolls and zooms.
See: http://www.google.com/finance?q=NYSE%3AXOM
I have seen the same widget being used by causes.com which makes me think that it is not a Google proprietary component.
http://www.causes.com/causes/579073-india-against-corruption/impact
Does anyone know where can I find this component or an alternative?
Just FYI: I am using Ext GWT and a Java back end.
Edit: On further search found it on Google Chart Tools. Its use seems to be dependent on Google's infrastructure. I don't want such dependencies in my app and so I guess I will have to settle for an alternative.
Are you looking for something like this?
http://dygraphs.com/tests/range-selector.html
dygraphs is an open-source self-contained JavaScript library for charting time series, with no dependencies. It automatically scales the graph to match your data, translates times into the correct time zone, can plot CSV files from arbitrary remote URLs etc.
Use the Annotated TimeLine chart provided in the Google Visualization API.
It gives you the same chart that you see in the link http://www.google.com/finance?q=NYSE%3AXOM
I have been working on an Ext-Gwt app that requires a chart with somewhat the same specs that you mentioned.
The google api Chart integrates well into my App, and is not that difficult to code. I am pretty satisfied with it and would recommend you to try it out.
It though does need Google Inra to draw the Charts though. So if you can decide on a tradeoff, it would be a great option for you.