Get Lexile Student Data Plot

Overview

This will generate a base64 encoded image that shows the projected growth curve for the given Lexile 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 Lexile 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
1 Closest decile: Fewer than 4 scores were given so the closest decile was selected
2 Outlier: More than 4 scores were given, but outlier caused the closest decile to be selected
3 Below Target: The growth trajectory is below the aspirational target
4 Within target: The growth trajectory is within the aspirational target
5 Above target: The growth trajectory is above the selected target
6 Custom Plot:4 or more scores were given and a custom growth trajectory was fitted

Example

This Python example shows how to plot a single Lexile measure.
import base64
import json
import requests

body = {
    "scale": "lexile",
    "measures": [
        {
            "grade": 4,
            "measure": 800,
            "schoolYearStart": {
                "month": 8,
                "year": 2020,
            },
            "testDate": {
                "month": 9,
                "year": 2020,
            },
        },
    ],
}

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_lexile_measure.png", "wb")
file.write(base64.b64decode(output.get("chart")))
file.close()
Single lexile measure on graph
This Python example shows how to plot multiple Lexile measures and save it as an image.
import base64
import json
import requests

body = {
    "scale": "lexile",
    "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_lexile_measures.png", "wb")
file.write(base64.b64decode(output.get("chart")))
file.close()
multiple lexile measure on graph