Reputation: 2015
I'm looking to build a Rails app to do internal reporting (make charts or general data visualizations, create reports, show statistical analyses, etc.) on data my company collects.
What would be helpful in building this? For example, any Rails/Javascript libraries I should be familiar with, or any open source analytics apps or existing dashboard tools I should look at?
Upvotes: 3
Views: 7897
Reputation: 3866
Don 't forget to create summaries of your data if you have lots of data. For example calculate all pageviews for a single day and store them in a Day table or so. Otherwise your app will become very unresponsive. Dont forget that Ruby 1.8 sucks for stats and math (slow)
Upvotes: 1
Reputation: 183
I'm actually doing almost the exact same thing right now, so I know what you are going through. For ruby on rails, there's a gem out there called Garb. So far it has worked pretty 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 information you need about the metrics and dimensions here:
http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html
and Garb information here:
http://www.viget.com/extend/introducing-garb-access-the-google-analytics-data-export-api-with-ruby/
I know that reporting is really frustrating, so I wish you the best of luck!
Upvotes: 1
Reputation: 15136
Google Visualization API is an easy way to get charts in your application. You could also have a look at Protovis and possibly InfoVis Toolkit.
Upvotes: 1