Skip to content

GabZech/wordcloud_mapper

Repository files navigation

wordcloud_mapper

PyPI - Version

GitHub Pipenv locked Python version

PyPI - License

GitHub repo size

wordcloud_mapper is a Python package that allows one to create wordclouds shaped like regions on a map.

Such visualisations are especially useful when communicating sets of data that consist of many different observations and each observation is attributed to a specific region and size of occurrence. Take the example below, a dataset containing the name of the biggest companies (in terms of estimated number of employees in 2019) for each state in Germany.

image

Installation

To install wordcloud_mapper, run in your terminal:

pip install wordcloud_mapper

or

pip install wordcloud-mapper

Features and usage

  • Create a wordcloud map from data stored in a DataFrame object using wordcloud_map().
  • Easily resize a map by any desired scaling factor using resize_map().
  • Load dummy datasets to test out the package's features using load_companies().

See the documentation for more information on how to use the package and its functions.

Notes on geographical nomenclature

The classification of regions used here follows the European Union's Nomenclature of Territorial Units for Statistics (NUTS), a geocode standard for referencing the subdivisions of countries. The advantage of using this system is that the classification of regions across countries is standardised and hierarchically structured. For instance, Germany has the base code DE (NUTS 0), the state of Bavaria has the code DE2 (NUTS 1), its subregion of Oberbayern has the code DE21 (NUTS 2) and the city of Munich has the code DE212 (NUTS 3). Since each region is given a unique identifier which is directly linked to the regional level above it, it is fairly easy to identify and match any dataset to these regions.

However, this means that this package currently only works for creating wordcloud maps for EU countries. For an overview of the NUTS regions and levels, you can browse the available maps for each EU country or use this interactive map instead. If you have a dataset containing postcodes and want to convert these to NUTS regions, you can find the correspondence tables here.

In a future release, support nor non-NUTS regional referencing systems will be implemented.

Feedback and contributions

This package is under active development, so any feedback, recommendations, suggestions or contribution requests are more than welcome!

Please read the contribution instructions or email g.dev@posteo.net if you would like to provide any feedback.

About

A package for creating wordcloud maps in Python.

Resources

License

Stars

Watchers

Forks