Get Quantile Student Data Plot

Overview

This will generate a base64 encoded image that shows the projected growth curve for the given Quantile measurement(s).

Parameters

You can pass multiple user_scores objects. If:
  • 3 of fewer measures are given, the graph produced will show the decile curve closest to the given points.
  • 4 or more measures are given, an attempt will be made to produce a custom curve to fit the provided scores. If a valid curve is found it will be returned, otherwise the closest decile curve will be used.

Parameter Type Description
user_scores

Object

An object that contains the data required to plot a single user measurement. This object must contain:
  • grade: An integer between 3-11

  • date: A string representing date of measurement (mm-dd-YYYY)

  • score: An integer of the Lexile or Quantile measurement

  • school_year_start_date: A string representing school year start (mm-yy)

Response

The Quantile graph will be returned with 2 of the codes in this table. The first number (1, 2 or 6) will represent how many scores were given and how the graph was plotted and the 2nd number (3, 4, and 5) will represent the target information.

Code Description
200

Success

Media Type: application/json

Example Value / Schema

Sample response body for the Lexile Scale

{
  "finalEstimate": 1328,
  "finalTarget": 1300,
  "codes": [
    "closestDecile",
    "withinCCR",
    "withinURR",
    "withinCCRR",
    "withinWRR"
  ]

Sample response body for the Quantile Scale

{
  "finalEstimate": 1530,
  "finalTarget": 1340,
  "codes": [
    "closestDecile",
    "aboveCCR",
    "aboveACCR",
    "aboveFCCR",
    "aboveLCCR"
  ]
400

Bad Request

Media Type: application/json

Example Value / Schema

{
  "message": "string",
  "exception_type": "string",
  "success": false,
  "error_msg": {},
  "validation_errors": {}
}
401

Unauthorized

Media Type: application/json

Examples: Missing Authentication Token

Example Value / Schema

{
  "message": "Authentication credentials were not provided.",
  "exception_type": "NotAuthenticated",
  "success": false,
  "error_msg": "Authentication credentials were not provided."
}

Unauthorized

Media Type: application/json

Examples: Bad Authentication Token

Example Value / Schema

{
  "message": "Incorrect authentication credentials.",
  "exception_type": "AuthenticationFailed",
  "success": false,
  "error_msg": "Error decoding token.",
  "additional_info": "Error decoding token."
}

Example

This example shows how to plot a single Quantile measure.

import base64
import json
import requests

body = {
    "scale": "quantile",
    "measures": [
        {
            "grade": 7,
            "measure": 1000,
            "schoolYearStart": {
                "month": 8,
                "year": 2017,
            },
            "testDate": {
                "month": 5,
                "year": 2018,
            },
        },
    ],
    "additionalOptions": [
        "fundamentalCollegeAndCareerReadinessRange", 
    ]
}

response = requests.post(
    "https://atlas-growth-planner.lexile.com/growth-chart",
    json=body,
    headers={
        "accept": "application/json; version=1.0",
        "content-type":"application/json; version=1.0",
    },
)

output = json.loads(response.text)

file = open("single_quantile_measure.png", "wb")
file.write(base64.b64decode(output.get("chart")))
file.close()
Single Quantile measure plotted on graph

This Python example shows how to plot multiple Quantile measures and save it as an image.

import base64
import json
import requests

body = {
    "scale": "quantile",
    "measures": [
        {
            "grade": 5,
            "measure": 700,
            "schoolYearStart": {
                "month": 8,
                "year": 2011,
            },
            "testDate": {
                "month": 10,
                "year": 2011,
            },
        },
        {
            "grade": 6,
            "measure": 800,
            "schoolYearStart": {
                "month": 8,
                "year": 2012,
            },
            "testDate": {
                "month": 10,
                "year": 2012,
            },
        },
        {
            "grade": 7,
            "measure": 900,
            "schoolYearStart": {
                "month": 8,
                "year": 2013,
            },
            "testDate": {
                "month": 10,
                "year": 2013,
            },
        },
        {
            "grade": 8,
            "measure": 980,
            "schoolYearStart": {
                "month": 8,
                "year": 2014,
            },
            "testDate": {
                "month": 10,
                "year": 2014,
            },
        },
    ],
}

response = requests.post(
    "https://atlas-growth-planner.lexile.com/growth-chart",
    json=body,
    headers={
        "accept": "application/json; version=1.0",
        "content-type":"application/json; version=1.0",
    },
)

output = json.loads(response.text)

file = open("multiple_quantile_measures.png", "wb")
file.write(base64.b64decode(output.get("chart")))
file.close()
Multiple Quantile Measures