From 42d67aec434bd79568083650ef38e5953557b7c0 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 13:26:22 -0700 Subject: [PATCH 1/9] Create CITATION.cff --- CITATION.cff | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..d4c8146e --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,28 @@ +# This CITATION.cff file was generated with cffinit. +# Visit https://bit.ly/cffinit edit via form. + +cff-version: 1.2.0 +title: 'stefmolin/data-morph: Data Morph' +message: 'If you use this software, please cite it as below.' +type: software +authors: + - family-names: Molin + given-names: Stefanie + orcid: 'https://orcid.org/0009-0001-3359-3346' +identifiers: + - type: doi + value: 10.5281/zenodo.7834198 +repository-code: 'https://github.com/stefmolin/data-morph' +url: 'https://stefmolin.github.io/data-morph/' +abstract: >- + Morph an input dataset of 2D points into select shapes, + while preserving the summary statistics to a given number + of decimal points through simulated annealing. +keywords: + - data visualization + - summary statistics + - data animation +license: MIT +commit: d3d2f3826efaa2de41ae688a661cd06e3ff79112 +version: 0.1.0 +date-released: '2023-04-01' From fa0ad35c1c05b396f7705e7338a8f5d4f2c8daad Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:18:42 -0400 Subject: [PATCH 2/9] Fix labeler config for README update. --- .github/labeler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index e4a3c8e9..8afe97e0 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -17,14 +17,14 @@ data: documentation: - '.github/workflows/docs.yml' - docs/**/* -- README.rst +- README.md morpher: - src/data_morph/morpher.py packaging: - pyproject.toml -- README.rst +- README.md - LICENSE - src/data_morph/__init__.py From 927f9e6b500a026ad640b81c2b7552d0f436e6c8 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:20:00 -0400 Subject: [PATCH 3/9] Add CITATION.cff labels. --- .github/labeler.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 8afe97e0..2e9b2cce 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -23,9 +23,10 @@ morpher: - src/data_morph/morpher.py packaging: +- CITATION.cff +- LICENSE - pyproject.toml - README.md -- LICENSE - src/data_morph/__init__.py plotting: From 270300a0de9034151a18fdab3459773b839b1c50 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:21:30 -0400 Subject: [PATCH 4/9] Add GitHub action to validate CITATION.cff file in PRs. --- .github/workflows/citation-validate.yml | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/citation-validate.yml diff --git a/.github/workflows/citation-validate.yml b/.github/workflows/citation-validate.yml new file mode 100644 index 00000000..dc3e110e --- /dev/null +++ b/.github/workflows/citation-validate.yml @@ -0,0 +1,37 @@ +# This workflow checks that the CITATION.cff file is valid, if it is included in the PR. +# +# Author: Stefanie Molin + +name: Validate CITATION.cff + +on: + pull_request: + paths: + - 'CITATION.cff' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + # check that the CITATION.cff configuration is valid + citation: + runs-on: ubuntu-latest + name: Validate CITATION.cff + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install cffconvert + run: pip install cffconvert + - name: Validate + run: | + verdict=$(cffconvert --validate) + echo $verdict + if [[ $verdict != "Citation metadata are valid"* ]]; then + exit 1 + fi From 49327f904a9e1a16f7bb469e3c1fa5b6d99c16e4 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:22:24 -0400 Subject: [PATCH 5/9] Switch to zenodo doi for all of Data Morph to avoid needing to update each release. --- CITATION.cff | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index d4c8146e..c74f0d8c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -11,7 +11,7 @@ authors: orcid: 'https://orcid.org/0009-0001-3359-3346' identifiers: - type: doi - value: 10.5281/zenodo.7834198 + value: 10.5281/zenodo.7834197 repository-code: 'https://github.com/stefmolin/data-morph' url: 'https://stefmolin.github.io/data-morph/' abstract: >- @@ -23,6 +23,3 @@ keywords: - summary statistics - data animation license: MIT -commit: d3d2f3826efaa2de41ae688a661cd06e3ff79112 -version: 0.1.0 -date-released: '2023-04-01' From 8704af832b45284ade8f1f957aeb6c5f07bcfa4b Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:34:39 -0400 Subject: [PATCH 6/9] Add doi badge to README. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e139904..41cb4a33 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![codecov](https://codecov.io/gh/stefmolin/data-morph/branch/main/graph/badge.svg?token=3SEEG9SZQO)](https://codecov.io/gh/stefmolin/data-morph) [![CI](https://github.com/stefmolin/data-morph/actions/workflows/ci.yml/badge.svg)](https://github.com/stefmolin/data-morph/actions/workflows/ci.yml) [![Deploy Docs](https://github.com/stefmolin/data-morph/actions/workflows/docs.yml/badge.svg)](https://github.com/stefmolin/data-morph/actions/workflows/docs.yml) +[![DOI](https://zenodo.org/badge/597895841.svg)](https://zenodo.org/badge/latestdoi/597895841) Morph an input dataset of 2D points into select shapes, while preserving the summary @@ -22,8 +23,7 @@ $ pip install data-morph-ai ## Usage -Once installed, Data Morph can be used on the command line or as an importable Python package. -Below are some examples; be sure to check out the +Once installed, Data Morph can be used on the command line or as an importable Python package. Below are some examples; be sure to check out the [documentation](https://stefmolin.github.io/data-morph) for more information. From b45951a275194150d8325257e20514e32c09ee7a Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:40:59 -0400 Subject: [PATCH 7/9] Add note about citations to README. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41cb4a33..a5b21b08 100644 --- a/README.md +++ b/README.md @@ -98,4 +98,8 @@ In this example, we morphed the built-in panda `Dataset` into the star `Shape`. This code has been altered by Stefanie Molin ([@stefmolin](https://github.com/stefmolin)) to work for other input datasets by parameterizing the target shapes with information from the input shape. The original code works for a specific dataset called the "Datasaurus" and was created for the paper *Same Stats, Different Graphs: Generating Datasets with Varied Appearance and Identical Statistics through Simulated Annealing* by Justin Matejka and George Fitzmaurice (ACM CHI 2017). The paper, video, and associated code and datasets can be found on the -Autodesk Research website [here](https://www.autodeskresearch.com/publications/samestats>). The version of this code placed on GitHub at [jmatejka/same-stats-different-graphs](https://github.com/jmatejka/same-stats-different-graphs), served as the starting point for the Data Morph code base, which is on GitHub at [stefmolin/data-morph](https://github.com/stefmolin/data-morph). +Autodesk Research website [here](https://www.autodeskresearch.com/publications/samestats). The version of this code placed on GitHub at [jmatejka/same-stats-different-graphs](https://github.com/jmatejka/same-stats-different-graphs), served as the starting point for the Data Morph code base, which is on GitHub at [stefmolin/data-morph](https://github.com/stefmolin/data-morph). + +## Citations + +If you use this software, please cite both Data Morph (DOI: [10.5281/zenodo.7834197](https://doi.org/10.5281/zenodo.7834197)) and *[Same Stats, Different Graphs: Generating Datasets with Varied Appearance and Identical Statistics through Simulated Annealing](https://www.autodeskresearch.com/publications/samestats)* by Justin Matejka and George Fitzmaurice (ACM CHI 2017). From 92fbbf94913546c61fc7970e66d6fd1082cbe1f0 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 18:00:23 -0400 Subject: [PATCH 8/9] Add citation information to docs. --- docs/api.rst | 4 ++++ docs/citation.rst | 6 ++++++ docs/index.rst | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 docs/citation.rst diff --git a/docs/api.rst b/docs/api.rst index 89e3d34e..c40ce056 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -38,3 +38,7 @@ This produces the following animation in the directory specified as ``output_dir .. note:: There is also a :ref:`CLI option ` for morphing. + +.. rubric:: Citations + +.. include:: citation.rst diff --git a/docs/citation.rst b/docs/citation.rst new file mode 100644 index 00000000..ec57c405 --- /dev/null +++ b/docs/citation.rst @@ -0,0 +1,6 @@ +If you use this software, please cite both Data Morph (DOI: +`10.5281/zenodo.7834197 `_) and +"`Same Stats, Different Graphs: Generating Datasets with Varied Appearance +and Identical Statistics through Simulated Annealing +`_" +by Justin Matejka and George Fitzmaurice (ACM CHI 2017). diff --git a/docs/index.rst b/docs/index.rst index 1a3c5be7..0352c4c8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,3 +21,8 @@ Data Morph .. include:: quickstart.rst :start-after: .. INSTALLATION + +Citations +--------- + +.. include:: citation.rst From 499d2b48783f58ef0116ea7b373f7749e98ffb49 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sun, 16 Apr 2023 18:14:45 -0400 Subject: [PATCH 9/9] Reformat README. --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a5b21b08..d57ba7d4 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,7 @@ [![DOI](https://zenodo.org/badge/597895841.svg)](https://zenodo.org/badge/latestdoi/597895841) -Morph an input dataset of 2D points into select shapes, while preserving the summary -statistics to a given number of decimal points through simulated annealing. +Morph an input dataset of 2D points into select shapes, while preserving the summary statistics to a given number of decimal points through simulated annealing. ![Morphing the panda dataset into the star shape.](https://raw.githubusercontent.com/stefmolin/data-morph/main/docs/_static/panda-to-star-eased.gif) @@ -23,8 +22,7 @@ $ pip install data-morph-ai ## Usage -Once installed, Data Morph can be used on the command line or as an importable Python package. Below are some examples; be sure to check out the -[documentation](https://stefmolin.github.io/data-morph) for more information. +Once installed, Data Morph can be used on the command line or as an importable Python package. Below are some examples; be sure to check out the [documentation](https://stefmolin.github.io/data-morph) for more information. ### Command Line Usage @@ -35,8 +33,7 @@ Run `data-morph` on the command line: $ data-morph --start-shape panda --target-shape star ``` -This produces the animation in the newly-created `morphed_data` directory -within your current working directory (shown above). +This produces the animation in the newly-created `morphed_data` directory within your current working directory (shown above). ---- @@ -48,9 +45,7 @@ $ data-morph --help ### Python Usage -The `DataMorpher` class performs the morphing from a `Dataset` to a `Shape`. -Any `pandas.DataFrame` with numeric columns `x` and `y` can be a `Dataset`. -Use the `DataLoader` to create the `Dataset` from a file or use a built-in dataset: +The `DataMorpher` class performs the morphing from a `Dataset` to a `Shape`. Any `pandas.DataFrame` with numeric columns `x` and `y` can be a `Dataset`. Use the `DataLoader` to create the `Dataset` from a file or use a built-in dataset: ```python from data_morph.data.loader import DataLoader