javascript - Building an analytics dashboard in Rails - Stack Overflow

I'm looking to build a Rails app to do internal reporting (make charts or general data visualizati

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 pany 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?

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 pany 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?

Share asked Jun 16, 2010 at 22:24 BobBob 2,0152 gold badges14 silver badges6 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 1

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.

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./apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html

and Garb information here:

http://www.viget./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!

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 bee very unresponsive. Dont forget that Ruby 1.8 sucks for stats and math (slow)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745049417a4608293.html

相关推荐

  • javascript - Building an analytics dashboard in Rails - Stack Overflow

    I'm looking to build a Rails app to do internal reporting (make charts or general data visualizati

    9小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信