Useful Resources

AI

Once you have reached a level where you know the questions you want to ask, AI is super helpful in giving you answers and code examples to achieve your goals.

Chart Configs:

Color Generators

Charting/Accessibility Best Practices

Useful Snippets:

  1. Remove currency and basic numeric fomatting from data fields:

"data" : { ... incuding a formatted field called "Amount" ... },
"transform":[
  {
    "calculate": "parseFloat(replace(datum.Amount, /[$,]/g, ''))",
    "as": "Amount"
  }
]
  1. Make a legend uppercase:

"encoding": {
  "color": {
    ...
    "legend": {
      "legendExpr": "upper(datum.label)"
    }
  }
}
  1. Manually set the order of fields:

"encoding":{
  "color":{
    "scale":{
      "domain":[
        "Direct School Expenses",
        "School Services Budgeted Centrally",
        "Central Administration",
        "Charter Assessment",
        "Non-BPS Student Services"
      ]
    }
  }
}

Last updated

Was this helpful?