I am trying to created a medical dashboard and am looking for a way to parse the 7 most recent entries from my json file to graph. I’m not too sure where or how to begin this task. I have over a years worth of data but it doesn’t display well. The end goal is to have weekly, (past 7 days), monthly (weekly avg over last 4 weeks) and finally yearly (avg monthly over last 12 months). Any direction on this project is appreciated
Can you paste part of your JSON file (anonymised, of course)?
Any way you can do the heavy lifting server-side? (AFAIK, most databases should be able to easily do this with some well crafted queries) i.e. so the JSON has only 7 (or 4 or 12) entries.
Begin by analyzing what needs to be done, then research how to do that. When you have difficulty with something specific then you write a specific question that clearly explains the problem and describes what you have tried to do to solve the problem. This question requires at least four relatively separate problems.
- read the JSON data
- select the data to use
- process the data
- generate the graph
Again, each of those that you need help with should be separate questions.
as far as I know This is what I have done. I stated in my question that I have a graph that is not really readable, so that eliminates all the bullet points but one. Select the data to use. Hence my question. Thanks for the feedback
the following is for a single day. I thought maybe I could pull by date, but from what I understand a date really isnt a date in json
“Weight (lb)”: 179.4,
“Body Fat”: “20.1%”,
“Muscle Mass”: “36.6%”,
“Date/Time”: “Jul 29 2018 02:09:37 PM”
I have considered that, but I dont have a website and dont know if I put a database on dropbox/google drive if files on my device can access the database and pull the data in for graphing.
var DateTime = new Date("Jul 29 2018 02:09:37 PM"); var testdata = DateTime.getFullYear() + " | " + DateTime.getHours();