AI

Visualize Endangered Animal Populations with Python

[ad_1]

Fast Success Knowledge Science

Knowledge Journalism at its greatest

Pixelated picture of a red panda.
Unique picture by Mathias Appel (CC0 1.0 Universal)

Knowledge journalism is a discipline of journalism that makes use of knowledge evaluation, visualization, and interpretation to inform compelling and informative tales. Like knowledge scientists, knowledge journalists leverage knowledge and statistical strategies to uncover tendencies, patterns, and insights inside datasets. When accomplished nicely, their work supplies context and depth to information reporting.

In 2008, the World Wildlife Fund Japan ran an award-winning print marketing campaign that used image pixelation to depict endangered species populations. Every picture of an endangered animal was decimated till its variety of pixels equaled the variety of present members of that species. The extra pixelated and vague a picture, the less animals stay.

This was an effective way to attract consideration to the plight of many species, and others have replicated the marketing campaign. On this Fast Success Knowledge Science venture, we’ll write code that allows you to reproduce this award-winning method utilizing the Pillow fork of the Python Imaging Library (PIL).

We’ll additionally refine the method to point out each the unique and altered image of the animal. This design is beneficial when (sadly) the animal is not recognizable within the altered picture. Right here’s an instance utilizing an endangered California condor:

California condor (public domain, USFWS)

Every pixel within the right-hand picture represents a dwelling condor. This can be a highly effective technique to reveal how few stay.

We’ll cowl three vital coding expertise on this venture:

  • Easy methods to programmatically load photographs from the web.
  • Easy methods to programmatically manipulate photographs with Pillow.
  • Easy methods to programmatically annotate photographs of various sizes.

To run the code, you’ll want the Pillow and Matplotlib third-party libraries, photographs of endangered animals, and a rely of the variety of every animal…

[ad_2]

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button