Today we’ll have a look on how to use blender CLI to automate Data Visualisation.
In those COVID-19 times we’ll use a public API to get fresh data about COVID spread around countries.
https://www.data.gouv.fr/fr/datasets/donnees-hospitalieres-relatives-a-lepidemie-de-covid-19/#_
Here Python we’ll be use to launch Blender passing it a Python Script. Don’t be confused, the same Blender python script could be launch with your favorite langage.Look Point 3
Software used :
- Blender 2.81 (https://www.blender.org/)
- Python 2.7 (https://www.python.org/)
Be sure (on Mac, Windows or Linux) to have Blender, Python in your PATH so you’ll be able to execute those executables wherever folder you are on your computer.
- Check requirements
Open command line.
If Blender is in the path you would be able to launch it typing :
$ blender
Same for Python :
$ python -v
2. Choose your playground !
Next you have to choose where you want to plot your datas and what kind of data you want to visualize.
For the tutorial i will use Japan to plot datas.
I’ll get an SVG File of the country with districts on Wikipedia:
https://upload.wikimedia.org/wikipedia/commons/6/6e/Japan_location_map.svg
$ wget https://upload.wikimedia.org/wikipedia/commons/6/6e/Japan_location_map.svg
You could now open Blender and import the SVG file.

You make the import. Once is done, no worries. You won’t see anything new on the 3D view, but have a look at the Outliner:


For the tutorial we’ll use a simple example using only 2 districts. Let’s choose a big one, Curve.055 for example. Click on Curve.055 on the Outliner. (Hokkaidō District IRL)
