Possible to visualize neo4j graph in ruby on rails application? - ruby-on-rails

I'm quite novice to neo4j. I would like to find out if I can query a neo4j database from a ruby on rails application and use the result to make a graph visualization in my application. I have looked at d3.js, that problably can do it. I would just like to know if it possible to use GraphGist in a ruby on rails application and make a graph visualization as can be seen here. If I can use GraphGist where can I find more information how to use in a ruby on rails project? If I cannot use GraphGist would d3.js be a good choice of vizualizing neo4j graphs in a Ruby on Rails project?

I wrote a simple single html page Neo4j console that you can use to learn how do to it.
The master branch uses the alchemy.js library http://jexp.github.io/cy2neo
And the neod3 branch uses the visualization from the graphgist project.
If you clone it locally and check out that branch and run the file in a browser you should be able to see the visualization.

Related

Rails : Analytics/Reporting Tool

I have an application with reporting feature where user can go query for my data.
As of now, I have written all the code to create the dynamic queries based on user's criteria and then run those queries in the data base and show it to the user.
What I need is a reporting tool, to which I will just give my data/database , and it will be provide an interface to run reports on.
My application is a Ruby on Rails application.
Any ideas ?
Checkout rails-data-explorer (RDE). RDE is a Rails engine plugin that makes it magically easy to explore your app's data using charts and statistics.

Neo4j with Ruby On Rails

I created a ruby on rails web app which I deployed on heroku, by following this guide
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
The app is very similar to this tutorial in that a user can create an account, log in, create an object with some information which is belongs to that user. These objects I created are meant to represent nodes which I would like to be able to create relationships between.
I have been reading up on Neo4j and it seems like the best fit for ruby but then I read that it only really works with JRuby. Could anyone tell me would it work with my implementation and if so , how? or if it dosent, what should I use instead?
JRuby allows Ruby to access Neo4j directly through the Java API. It is the fastest implementation possible. However, Neo4j also provides a REST API that allows any language to access it over HTTP.
I seems like your answer may be here: Which Ruby REST API client for neo4j?
This is again using the Neography gem, but this blog maxdemarzi has got some really nice posts on integrating ruby with neo4j.
Here's a link: http://maxdemarzi.com/2012/01/04/getting-started-with-ruby-and-neo4j/
But as mentioned by others, I don't think you'd get anything that can talk directly to the Java API other than JRuby.

Neo4j spatial in ruby

I recently started playing with neo4j graph database in a Rails application and loved how rich the neo4j is. Although I saw that there is spatial support for neo4j via neo4j-spatial I haven't seen an example in a ruby application to get me started (using the ruby port of neo4j-spatial).
What I want to accomplish at first is to have a User model and a Poi model both having lat, lng attributes and make a query: Show me the Poi's that are at most 10km away from me
but I have no idea how I have to go about using the ruby gem. All I have found on the subject is this blog spot.
Does anyone know how am I supposed to do this in ruby? Thanks!
I think the ruby gem is a bit out of date. I suggest either forking and updating it, or use straight Java APIs for that, see the original java methods that the Spatial ruby just wraps.
Lemme know if you want to contribute and update, would be great!
I wrote the gem as a simple wrapper. It depends on neo4j.rb so you get all the necessary ruby on rails capabilities from that. Then it includes the spatial dependencies also. In addition it provides utilities for wrapping OSM import and export and dynamic layer support. It does not provide utilities to wrap the simple point layer which you seem to want. However you kind of get that for free anyway with jruby directly wrapping all of the java API for you.
My recommendation would be to use neo4j-spatial.rb and then use the neo4j.rb capabilities to build your model. Access the simple point layer directly from jruby and just add your new nodes to that. Then you can call the distance search function, also from jruby.

Are there any Ruby on Rail Gems or Plug-ins that performs web queries

I need build in web query capability similar to what you can do in Excel for a project that I'm working on. Has anyone come across a gem, plug-in or application with this capability.
Clarification: To clarify, the excel web query features that I'm trying to create is the ability to extract data from specified tables on a web page. A good example would be if given a particular ticker symbol the web query would be able to submit the ticker symbol and then extract and display output table.
I've looked at fork on project like nokogiri, celerity and other screen scraping apps but have not come across what I'm looking for yet.
Thanks for your insights, ideas and suggestions.
If you are interested in possible screen scraping gems/plugins checkout: regexp_crawler, spidr, scrAPI or mechanize

semantic web development using Ruby on Rails

We are started the project on semantic web using Ruby on Rails.Please let me know the tools available for this and we can easily implement.for this I need to know that I can create RDF schema ,ontology .Please send any link that on semantic web,RDFs in ROR.
Thanks in advance
Naveenkumar.R
There are already some posts on SO covering this topic. One of the popular ones is The State of RDF in Ruby

Resources