Journocoders November 2024

Exploring and visualising data with Vega-Lite

Show and tell

Please add links to anything related to data or journalism here! Great data stories you’ve seen, new tools, jobs you’re hiring for, announcements – anything others might be interested in 👇

Tutorial

Start with the getting started tutorial here:

Each step in the tutorial has a link to open in the Vega Editor, but I’d recommend you try and start with a blank editor and adding/modifying it as you move through the tutorial. You may have to press ‘run’ in the top left. If you get an error there’s a good chance you’ve missed a closing bracket or quote somewhere.

If you have some of your own data you want to play with using Vega-Lite, you’ll need to convert it to Json format. There are many converters online for this, such as this one.

Then follow the exploring data tutorial here:

If you still have time, try making a map with Vega-Lite (see notes below!):
This tutorial is a little old, so we need to make a couple of changes so it works:

  • The $schema needs to be changed from v3.json to the latest v5.json
  • The link to the local authority boundaries is dead. The latest boundaries data is here. Click ‘I want to use this’, then ‘view API resources’, and use the GeoJson link for your data URL.
  • Properties in the latest data are a little different: they’re now all-uppercase, and the ones which had the number 16 now have the number 24. For example, in your config, instead of properties.lad16nm you want properties.LAD24NM. You can click ‘view data table’ on the Open Geography Portal to see all the field names.

Next time

The next meetup will be on Wednesday 4th December at the News Building. We also have dates up to next March!

What should we cover? Anything we should or shouldn’t be doing? We want your ideas!

Interested in what we’ve covered before? We have a list!