Skip to main content

Wordcloud Scripts

Description

This is a collection of scripts that manipulate report data files (downloaded from Susmon front-end) and other report data files created by researchers to create counts of the top words create word clouds.

Key scripts:

main.py - Main program loop that determines actions to be taken and calls relevant methods
esg.py - ESG word clouds. Works from the standard report data file downloaded from the database and from a bespoke report created by research
netzero.py - Net Zero word clouds and word counts. Works from a filtered report file provide by research
Other modules contain common fuctions used by both scripts

Installation

Scripts are written in Python 3. Libraries and version identified in requirements.txt

There are two control files that must be in place for the scripts to run:

stopwords.csv - generic words and phrases to be excluded from word clouds
phrases.csv - word combinations that should be treated as phrases in word clouds 

These files can be uploaded and updated via the main code loop as decribed below.

Usage

The code is run as follows:

python -m src.clouds.main <input file> <action "create"/"update"> [--resource <"phrases"/"stopwords">] [--sector <sector name>] [--classification <"Environmental", "Social", "Governance">]

When used with the action argument "create", the program will use the "input file" to generate word clouds as follows:

if <input file> name contains "NZ", or "Net Zero" a set of Net Zero word clouds will be created
otherwise
if a <sector name> is supplied, word clouds will be generated for each brand owners in that sector and each classification. In addition word clouds will be created for all brand owners comnined for each classification and for all brand owners across all classifications. The input file in this case should be a standard report data file downloaded from the database
if no <sector name> is supplied and a <classification> other than "All" has been supplied, a word cloud will be created for the <classification> supplied for all brands in the input file combined. The input file in this case should be one provided for this purpose by the research team.
if no <sector name> is supplied and a <classification> of "All" has been supplied, a word cloud will be created for the all classifications and all brands in the input file combined. The input file in this case should be one provided for this purpose by the research team.

When used with the action argument "update", the program will use the "input file" to update one of the two control files as determined by the resource argument "phrases", or "stopwords".

Support

[to be written]

Release files for susclouds 0.0.28

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

Source distribution (sdist)

Source distribution for susclouds 0.0.28
File Size Uploaded
susclouds-0.0.28.tar.gz 93.6 MB Details

Built distribution (wheel)

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

Total release size: 93.6 MB

Release files / susclouds-0.0.28.tar.gz

Download URL susclouds-0.0.28.tar.gz
Size 93.6 MB
Tags Source
SHA-256 checksum
How to use checksums
a81f6f4a01982f113dee333316e29362e6e20b3ba2a163d5ab4047bd7efc12dc
BLAKE2b-256 checksum
How to use checksums
ad8143668376aa2b6ba9d9da614c6538cafa4af48e0717de75e5348518c4ea6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release files / susclouds-0.0.28-py3-none-any.whl

Download URL susclouds-0.0.28-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a625c9a52a4a786148eeda2e1ac807cb2c06b7bf1901ca33e724a3b7e6580423
BLAKE2b-256 checksum
How to use checksums
6c720914e52f4d478888b37e0e2dd0a17ceb0ff87d7dd78adb7b9b8db63b927c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.28 This release

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

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