Static data - JSON format


Problem Statement

Define a JSON format to store the static data to be displayed in Dashboard Metrics


Approach 1 - Single JSON file for all static data configuration


{
  "metricsSummary": {
    "metricsAsOnYear": "2019",
    "onboardSummary": {
      "stateCount": 26
    },
    "etbSummary": {
      "etbPrintCount": 20000000,
      "boardCount": 26
    },
    "contentCreationSummary": {
      "languages": 15,
      "teachers": 6000
    }
  },
  "onboardMetrics": {
    "states": [
      {
        "stateName": "Maharashtra",
        "onboardStatus": "Live",
        "academicYear": "2018-19"
      },
      {
        "stateName": "Assam",
        "onboardStatus": "In Progress",
        "academicYear": "2019-20"
      }
    ]
  },
  "etbPrintMetrics": {
    "boards": [
      {
        "board": "DSERT",
        "stateName": "Karnataka",
        "classes": "1,2,6,8",
        "subjects": "English, Science",
        "etbPrintCount": 20000,
        "etbAcademicYear": "2018-19",
        "status": "Live"
      },
      {
        "board": "CBSE",
        "stateName": "-",
        "classes": "6,8",
        "subjects": "Maths, Social Studies",
        "etbPrintCount": 15000,
        "etbAcademicYear": "2019-20",
        "status": "Inprogress"
      }
    ]
  }
}

Approach 2 - Separate JSON files to configure summary and drill down data


Metrics SummaryOnboard Metrics Drill-down DataETB Metrics Drill-down Data
{
  "metricsSummary": {
    "metricsAsOnYear": "2019",
    "onboardSummary": {
      "stateCount": 26
    },
    "etbSummary": {
      "etbPrintCount": 20000000,
      "boardCount": 26
    },
    "contentCreationSummary": {
      "languages": 15,
      "teachers": 6000
    }
  }
}
{
  "onboardMetrics": {
    "states": [
      {
        "stateName": "Maharashtra",
        "onboardStatus": "Live",
        "academicYear": "2018-19"
      },
      {
        "stateName": "Assam",
        "onboardStatus": "In Progress",
        "academicYear": "2019-20"
      }
    ]
  }
}
{
  "etbPrintMetrics": {
    "boards": [
      {
        "board": "DSERT",
        "stateName": "Karnataka",
        "classes": "1,2,6,8",
        "subjects": "English, Science",
        "etbPrintCount": 20000,
        "etbAcademicYear": "2018-19",
        "status": "Live"
      },
      {
        "board": "CBSE",
        "stateName": "-",
        "classes": "6,8",
        "subjects": "Maths, Social Studies",
        "etbPrintCount": 15000,
        "etbAcademicYear": "2019-20",
        "status": "Inprogress"
      }
    ]
  }
}

Approach 3 - Separate metric-wise(summary+drill-down data) JSON configuration files


Onboard MetricsETB MetricsContent Creation Metrics
{
  "onboardMetrics": {
    "metricsAsOnYear": "2019",
    "stateCount": 26,
    "states": [
      {
        "stateName": "Maharashtra",
        "onboardStatus": "Live",
        "academicYear": "2018-19"
      },
      {
        "stateName": "Assam",
        "onboardStatus": "In Progress",
        "academicYear": "2019-20"
      }
    ]
  }
}
{
  "etbPrintMetrics": {
    "metricsAsOnYear": "2019",
    "boardCount": 29,
    "etbTotalPrintCount": 4500000000,
    "boards": [
      {
        "board": "DSERT",
        "stateName": "Karnataka",
        "classes": "1,2,6,8",
        "subjects": "English, Science",
        "etbPrintCount": 20000,
        "etbAcademicYear": "2018-19",
        "status": "Live"
      },
      {
        "board": "CBSE",
        "stateName": "-",
        "classes": "6,8",
        "subjects": "Maths, Social Studies",
        "etbPrintCount": 15000,
        "etbAcademicYear": "2019-20",
        "status": "Inprogress"
      }
    ]
  }
}
{
  "contentCreationMetrics": {
    "metricsAsOnYear": "2019",
    "teachers": 6000,
    "languages": 15
  }
}