Visualizing a hierarchy of rectangles with neo4j? - graph

I am thinking of using neo4j to store a graph database. My data basically consists of a hierarchy of rectangular regions with fixed coordinates: the top node has R rectangles in it, each of those has Q rectangles in it, and so on. The regions do not form a rectangular subdivision. Since I have a lot of data, I would like to be able to present an interface where a user can click on a particular rectangle to see its substructures in more detail, and then be able to click on one of those rectangles to show more detail, and so on. My application would be sort of like Google Maps, where more detailed layers get loaded as a user zooms in. I was thinking of generating tiles to serve to OpenLayers or Leaflet for display, but my data has a graph structure that I would like to take advantage of, and I think using neo4j (possibly in combination with a visualization library like d3.js) may be an easier way to build my tool.
I have these questions about neo4j and the ability to visualize its data:
Can data in neo4j be organized into different layers corresponding to different levels of detail?
Can neo4j display nodes as rectangles with fixed coordinates on a 2D plane? Can these rectangles be selectable / "zoomable"?
I know neo4j has a default web interface for showing nodes but I'd like to know how customizable this is before committing a lot of time to it. The TreeMap example at https://github.com/mbostock/d3/wiki/Gallery sort of looks like what I want, but I'd like to show more detailed structure in regions that users select.

Related

(How) can I search a graph on arrows.app for a string?

After drawing a knowledge graph with hundreds of nodes and thousands of edges on arrows.app, I want to search the graph for a node by its name to add an additional node with an edge to that node on the graph manually.
Does the site support such a feature? If so, how can I manage to search? If not, any workarounds?
What I have tried: I switched to Gephi, but I need to download an application and I can only search for the node in the data laboratory and then locate the node in the overview.
100s of nodes and 1000s of edges in arrows.app? I like it a lot, but I don't think it was meant as a tool to do what you are doing, and for that reason does not have those search capabilities.
Whatever you are doing. Did you consider moving to a graph database altogether?

graph representation tool for huge data with specific features

I'm building a JavaFX app and I want to display interactive graph of my huge data in it. something like placing cytoscape in javaFX app and working with graph inside of my app. my node may be up to 30000 nodes at max but usually its about 200 nodes after filtering nodes.
key features (sorted by importance):
generating graph with best layout and good looking with good performance and low overlapping (same as cytoscape)
selection some nodes and mark them (same as ctrl+L in cytoscape)
selecting neighbours of some nodes
building new graph from number 3
filtering graph base on weights, number of edges and ...
hiding and showing some selected edges and nodes
capturing image of built graph
Additional features :
zoom in zoom out
node tagging
multi color nodes and edges
Changing width of edges base on weight
Changing color of specific nodes and edges without rebuilding graph
Directed edge support
I have tested cytoscape.js but couldnt use it in javaFX browser. im testing WebVowl now. is anything better than these for my purpose ? if you suggest something that it cant be placed in javaFX app directly, please show how I do it.
Thanks
Depending on what you're trying to do, you could use Cytoscape as the data model, and build a JavaFX renderer around it. I've wanted to do this, but it's not in roadmap associated with our funding.
I've done a few JavaFX projects that might be good starting points, but they don't integrate directly with Cytoscape, which has a richer model of subnetworks, groups, etc.
https://github.com/AdamStuart/appFX/tree/master2/src/main/java/diagrams
one of which is based on a great example from TESIS DYNAware GmbH.
As you realize, the key issue is filtering down the network before trying to visualize it. The number of edges associated with 30000 nodes will bog down most any system, if you try to build something interactive.

Interactive alternative to dot?

From time to time I need to visualize dependencies/dependent structures. For example function calls, data structures etc.
For relatively small graphs Graphviz dot is a good match. The input format of dot is easy to generate and it produces good layouts.
But sometimes the graph contains too many vertices and dependencies to be useful as static PDF document. For that I want to use an interactive graph viewer, where I can dynamically select a main vertex (or two, restricting the displayed connections), temporarily hide vertices/edges to make the graph more accessible, zoom in/out, etc.
What are my open-source alternative for such an interactive tool?
Quoting from the long list (from Paul Sweatte's comment):
InfoVis Toolkit – The InfoVis Toolkit is an interactive graphics toolkit written in
Java to ease the development of Information Visualization applications
and components
Prefuse – Prefuse is a user interface toolkit for building highly
interactive visualizations of structured and unstructured data. This
includes any form of data that can be represented as a set of entities
(or nodes) possibly connected by any number of relations (or edges).
Examples of data supported by prefuse include hierarchies
(organization charts, taxonomies, file systems), networks (computer
networks, social networks, web site linkage) and even non-connected
collections of data (timelines, scatterplots). See also Jeff Heer, the
author of Prefuse (http://jheer.org/)
Treebolic - Treebolic is a Java component (widget) whose purpose is to provide a
hyperbolic rendering of hierarchical data. A tree is rendered with
nodes and edges but display space is subject to a particular curvature
(hence the name) : more space is allocated to the focus node while the
parent and children, still in the immediate visual context, appear
slightly smaller. The grandparents and grandchildren are still visible
but come out even smaller. As we move away from the focus node, less
display space is allotted to the nodes, which gradually disappear
towards the disk’s border, as though the whole hierarchy were seen
through a fisheye lens. Wrapped as a Java applet, the Treebolic widget
can be embedded in a web page. Nodes may then contain hypertext links
and the browser to other web pages. The tree is dynamic (animation
brings the focus node to the center) and responds to user interaction.
Walrus – Walrus is a tool for interactively visualizing large directed
graphs in three-dimensional space. By employing a fisheye-like
distortion, it provides a display that simultaneously shows local
detail and the global context. It is technically possible to display
graphs containing a million nodes or more, but visual clutter,
occlusion, and other factors can diminish the effectiveness of Walrus
as the number of nodes, or the degree of their connectivity,
increases. Thus, in practice, Walrus is best suited to visualizing
moderately sized graphs that are nearly trees. A graph with a few
hundred thousand nodes and only a slightly greater number of links is
likely to best target size

Mapping GPS coordinates to an area

I have devices moving across the entire country that report their GPS positions back to me. What i would like to do is to have a system that maps these coordinates to a named area.
I see two approaches to this:
Have a database that defines areas as polygons stretching between various GPS coords.
Use some form of webservice that can provide the info for me.
Either will be fine. It doesn't have to be very accurate at all, as i only need to know the region involved so that i know which regional office to call if something wrong happens with the device.
In the first approach, how would you build an SQL table that contained the data? And what would be your approach for matching a GPS coordinate to one of the defined areas? There wouldn't be many areas to define, and they'd be quite large, so manually inputting the values defining the areas wouldn't be a problem.
In the case of the second approach, does anyone know a way of programatically pulling this info off the web on demand? (I'd probably go for Perl WWW::Mechanize in this case). "close to Somecity" would be enough.
-
PS: This is not a "do the work for me" kind of question, but more of a brainstorming request. pseudo-code is fine. General theorizing on the subject is also fine.
In the first approach, how would you build an SQL table that contained
the data? And what would be your approach for matching a GPS
coordinate to one of the defined areas?
Asume: An area is defined as an closed polygon.
You match the GPS coordinate by simply calling a point inside polygon method, like
boolean isInside = polygon.contains(latitude, longitude);
If you have few polygons you can do a brute force search through all existing polygons.
If you have many of them and each (ten-) thousands of points, the you want to use a spatial grid, like a quadtree or k-d tree, to reduce the search to the relevant polygons.
method.
this process is called reverse geocoding, many services providers such as google, yahoo, and esri provide services that will allow to do this thing
they will return the closest point of interest or address, but you can keep the administrative level you are interested in
check terms of use to see which service is compatible with your intended usage

Coloring a map according to mapped database values

Question:
On
http://www.bbc.co.uk/news/10150007
one can see a map of european countries colored according to state debt/deficit.
Now I would have already found it useful several times if I was able to do such a thing myself, for example to visualize regional sales data.
Does anybody know:
Is there any (OpenSource) tool with which I can color a world/continental/reginal map according to colors mapped to values in a database ?
Or any tool that can construct a custom map ?
Or if there is no such thing, how would one do such a thing oneselfs ?
Get the outlines of countries from somewhere, make everything outside the country outlines transparent, set the coordinates and z-indeces to stack several images over one another, and then replace the base color with the selected color in each image, then merge the result to a single picture ?
I normally do this in R. Here are a bunch of examples of how to do this in R.
I also played a bit with QQis, and IIRC it can take input from a postgres PostGIS file.
The canonical commercial tool is ArcView, but it ends up being pricey.
The standard file format for maps is ESRI Shapefiles. These are actually collections of files with the attributes stored in a DBase IV format. Googling for 'shapefile viewer' will get you lots of tools.
There is also mapserver, which allows you to generate maps directly to the web.

Resources