Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nautilytics
Last active September 21, 2021 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nautilytics/7457bd6e51e97d9f381d937a5505053e to your computer and use it in GitHub Desktop.
Save nautilytics/7457bd6e51e97d9f381d937a5505053e to your computer and use it in GitHub Desktop.
Data Sample - Percent Positivity JSON Structure

Proposed JSON Structure for Multiple Percent Positivity Approach UI

Notes

  • If values array is empty then we don't plot the small multiple chart
  • There should be only 1 selected = true approach for each state and that approach will be used in place of MAP_PERCENT_POSITIVE for the Map.
    • The selected=true approach will also be highlighted with a gold rectangle in the new UI percent positivity view.
{
"approaches": [
{
"approachId": 1,
"demoninator": "Some text here",
"numerator": "Some text here",
"info": "Some text we want to inject into the info button"
}
]
}
{
"STATE_NAME": "Alabama",
...
"values": {
...
"PERCENT_POSITIVE": [
{
"approachId": 1,
"selected": true,
"values": [
{
"dt": "2020-01-01",
"value": ".07",
"average": ".08",
"change": "-.07"
},
{
"dt": "2020-01-02",
"value": ".08",
"average": ".08",
"change": "-.07"
},
]
},
{
"approachId": 2,
"selected": false,
"values": []
},
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment