Generates alt text for UpSet plots
Project description
:sparkles: upset-alt-txt-gen
Design experiments for generating semantically meaningful alt-text. This work is adapted from:
Alan Lundgard AND Arvind Satyanarayan (2022). Accessible Visualization via
Natural Language Descriptions: A Four-Level Model of Semantic Content. IEEE
Transactions on Visualization & Computer Graphics (Proc. IEEE VIS).
Local Deployment
- Clone the repository using
git clone
or download and extract the zip file. - Ensure you have python version >= 3.8.10 installed.
- Open a terminal in the repository directory and create and activate a python virtual environment running at least Python 3.8.10. For information on how to do this, navigate here.
- Install the required dependencies using
pip install -r requirements.txt
. - (Optional) Install the required development dependencies using
pip install -r requirements_dev.txt
. These are only required if you plan on running the tests or linting. - Install the alttxt module in development mode with
pip install -e .
To run the program with the example data, run python [path/to/alttxt directory] --data ../../data/movie_data_card_sort.json
Level and granularity can be changed to any of the options listed in Command Line Options.
Here is an example command:
For unix/macOS: python3 src/alttxt --data data/movie_data_dev_sort.json
For Windows: python src/alttxt --data data/movie_data_dev_sort.json
Local Testing
Local testing can be done using the tox
command. Tests have not been updated to match the latest updates to the repository, and updating them is currently on hold, as deployment is a priority over robustness.
- Linting: To run the linting tests, run
tox -e lint
- Type: To run the type tests, run
tox -e type
- Tests: To run the python tests, run
tox -e test
- Formatting: To automatically format the files to match the
flake8-black
standards, runtox -e format
To run the entire suite of tests at once, use tox
.
Command Line Options
Command | Description |
---|---|
-h , --help |
Show information on each command and exit. |
-V , --version |
Show the program version number and exit. |
-D , --data |
(Required) Relative path to data file. |
-l , --level |
Semantic level. Defaults to a combination of all levels. Options are: 1 , 2 . |
-st , --structured |
Returns information in JSON format that contains structured text (long description), alt-txt (short description), and technical description of the plot making strategy |
-t , --title |
A title for the plot; used in some generations. Defaults to has no title . |
------------------------ | ------------------------------------------------------------------------------------------------- |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file upset-alttxt-0.2.8.tar.gz
.
File metadata
- Download URL: upset-alttxt-0.2.8.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f96a1a0329cdd9e8ff820eee703625607e2ad11b12978aee63aaa5e9d8f99a |
|
MD5 | 3b5ef05c1db3ce4c8f147632750f3dbf |
|
BLAKE2b-256 | 45ed4c472e3ce5504f4ccabfaf905d4fcf7b3c3d9652e88c7c808ad0efb81d66 |
File details
Details for the file upset_alttxt-0.2.8-py3-none-any.whl
.
File metadata
- Download URL: upset_alttxt-0.2.8-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff4ff5d6d49d224897ee9804f8dd370a4f1c0131ad09668d8e57a4949a125344 |
|
MD5 | 9158533460fc9683bda1d7a1481aac06 |
|
BLAKE2b-256 | fb5352915e603db276eb1fb8b6d6dada3549c46d370b9fbbdd00ce7351da2560 |