Data parsing

#1

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

#2

Can you paste part of your JSON file (anonymised, of course)?

#3

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.

#4

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.

#5

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

#6

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%”,
“Water”: “62%”,
“BMI”: 25,
“Date/Time”: “Jul 29 2018 02:09:37 PM”
},

#7

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.

#8

First, JSON is JavaScript. The result of the following is “2018 | 14”, indicating that your Date/Time is a date and time.

var DateTime = new Date("Jul 29 2018 02:09:37 PM");
var testdata = DateTime.getFullYear() + " | " + DateTime.getHours();