Skip to main content

Software library to (re)produce burning ember and related diagrams of the style used in IPCC reports

Project description

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!

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

embermaker-2.1.0.tar.gz (80.4 kB view details)

Uploaded Source

Built Distribution

embermaker-2.1.0-py3-none-any.whl (88.1 kB view details)

Uploaded Python 3

File details

Details for the file embermaker-2.1.0.tar.gz.

File metadata

  • Download URL: embermaker-2.1.0.tar.gz
  • Upload date:
  • Size: 80.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.9 Darwin/23.5.0

File hashes

Hashes for embermaker-2.1.0.tar.gz
Algorithm Hash digest
SHA256 a5a59ec51aa6b32cd68efee8e6283949a744b42001ee05e4f90303315bb87e66
MD5 fa7cf96cf2a8957bc2bfc485d7eab03f
BLAKE2b-256 d52a9f208b690ef6b8c66ac71bb75833143927e6f3cddc728ff1c0a5bafc5571

See more details on using hashes here.

File details

Details for the file embermaker-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: embermaker-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 88.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.9 Darwin/23.5.0

File hashes

Hashes for embermaker-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dae9305376eeea65121452bfeebe48e666bd52502c74fafd46ade3ea561c4761
MD5 3abfc9acb59bd14c479d3a5555729172
BLAKE2b-256 6ad40c371d20f827efc145598a4f504114a5f5432655554f97f6b45d03601617

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page