Skip to main content

EmberMaker

Purpose

EmberMaker is a scientific graphic library aimed at (re)producing "burning ember" diagrams of the style used in IPCC (Intergovernmental Panel on Climate Change) reports. All graphics elements are in vector form, including color gradients (this implies specific drawing code).

EmberMaker was formerly a part of the EmberFactory project: https://pypi.org/project/EmberFactory/. If you need to produce ember diagrams from your data, first consider using the online EmberFactory. This package is intended to meet more specific needs, by drawing embers from your own code.

In addition to 'burning embers', EmberMaker can also draw common x-y plots which share the same vertical axis as a set of embers.

While EmberMaker is a Python package, it is quite easy to use within R, as shown in the last example below.

Installation

pip install embermaker

Only Python >= 3.10 is supported.

Basic usage

Creating embers only needs calling a few functions, as in this basic example:

from embermaker.embergraph import EmberGraph
from embermaker.ember import Ember

# Create ember
be = Ember(name='What this ember is about', haz_valid=[0, 5])

# Add two transitions to this ember
be.trans_create(name='undetectable to moderate', min=0.6, median=1.1, max=1.4, confidence='very high')
be.trans_create(name='moderate to high', min=1.7, median=2.2, max=2.5, confidence='high')

# Create an ember graph (available native image formats are PDF and SVG)
egr = EmberGraph("output_file_name", grformat="PDF")

# Change a parameter (list of parameters: https://climrisk.org/emberfactory/doc/parameters )
egr.gp['haz_axis_top'] = 5.0  # max value on axis 

# Add ember to graph (a list would work as well; more advanced uses define ember groups)
egr.add(be)

# Actually produce the diagram
outfile = egr.draw()

Usage examples

Examples are provided on FramaGit (a GitLab instance)

Access within python (/examples/python):

  • 'create_and_draw_embers.py' is the shorter and simpler. It illustrates a few functions constructing embers from data.
  • 'draw_embers_from_file.py' reads 'traditional' ember Excel sheets and shows how an x-y plot can be added.
  • 'test_error_reporting.py' illustrates a few cases which produce warning or error messages and how to access these.

Access from R (/examples/R):

  • 'create_and_draw_embers.R' illustrates functions constructing embers, within an R script and using data produced in R.

As this is the first "standalone" version, the API functions may be improved in the future, as well as more documented. We are interested in learning how you use this and any difficult you might face, to steer future development - thanks!

Use on web pages

Dark mode

When preparing SVGs for online use, it is possible to add supports for a 'dark mode' by selecting grformat="SVG-C". Then a colour scheme adapted to dark background can be activated in two ways:

Descriptive content / interactivity

When provided, the description of Embers and Transitions is available within SVG files and can be used to provide information interactively as shown in for example https://climrisk.org/cree/emberfigure?figure=14

Development history

The EmberFactory software was created by philippe.marbaix -at- uclouvain.be at the end of 2019. The first objective was to produce figure 3 of Zommers et al. 2020 (doi.org/10/gg985p).

Release files for embermaker 2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for embermaker 2.2
File Size Uploaded
embermaker-2.2.tar.gz 85.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for embermaker 2.2
File Interpreter ABI Platform
embermaker-2.2-py3-none-any.whl Python 3 none any Details

Total release size: 184.0 kB

Release files / embermaker-2.2.tar.gz

Download URL embermaker-2.2.tar.gz
Size 85.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8180532d19cf730fa5b7e2b141b09aad126904bcc28136971c0d6c87b1bba81e
BLAKE2b-256 checksum
How to use checksums
5a6286317683d6a3b3d29d7be6c5c93bb582a28c4517b72f8e8c1abd793e057c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.12.8 Darwin/24.5.0

Release files / embermaker-2.2-py3-none-any.whl

Download URL embermaker-2.2-py3-none-any.whl
Size 98.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
808e032896b5c465106ee12f8c5753931eb7b3271a1d8049fe948e615c434f5e
BLAKE2b-256 checksum
How to use checksums
a681f1bce5c3336be68a7ca76cea2b12d847a8a5f520c6a64e6748fb2ab78da1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.12.8 Darwin/24.5.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page