I have an API call that returns a JSON format for live statistics – Things like number of people who registered, signed in, performed action a, etc.
Now, I would like to have a history with some presentable graphs.
My plan is to hit the api once a day to get the json and save each result in an activerecord table.
Is there any better suggested way for this. Also, any gem recommendations to make my life easy.
- Create an activerecord model to with the report fields and a date column
- Hit API to get JSON once a day and populate above table
- Plot the above table with various possible dimentions
Highcharts would be something to check out then. It can take the JSON and present good graphs.
It was the easiest I found so far (and still not great). Once with that you can set up a CRON job with the
whenevergem to do the data pull once a day.