Creating an Dashboard in Rails

I want to create a Rails application to create internal reporting (create charts or visualize common data, create reports, show statistical analyzes, etc.) according to the data that my company collects.

What would be helpful in creating this? For example, any Rails / Javascript libraries that I should be familiar with, or any open source applications or existing toolbar tools that I should look at?

+3
source share
3 answers

The Google Visualization API is an easy way to get charts in your application. You can also look at Protovis and possibly InfoVis Toolkit .

+2
source

Now I am doing almost the same thing, so I know what you are experiencing. For rubies on rails there, the pearl there is called Garb. So far, this has worked very well for me. Example:

results = []
Garb::Session.login(analytics_email_address, analytics_password)
web_properties = Garb::Profile.all #you can filter here with a clojure or something
for profile in web_properties
  report = Garb::Report.new(profile, start_date, end_date)
  report.metrics MY_METRICS #you can read about these on the analytics api docs
  report.dimensions MY_DIMENSIONS #same here
  results << report.results
end
#do more stuff

This is a simple / quick / dirty example, but it works; You can get the necessary information about indicators and measurements here:

http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html

and Garb info here:

http://www.viget.com/extend/introducing-garb-access-the-google-analytics-data-export-api-with-ruby/

, , !

+1

Remember to create summaries of your data if you have a lot of data. For example, calculate all page views in one day and save them in a daily table or so. Otherwise, your application will become very unresponsive. Don't forget that Ruby 1.8 sucks for statistics and math (slow)

+1
source

Source: https://habr.com/ru/post/1750390/


All Articles