diff --git a/README.md b/README.md index e49a6687..02b458bc 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ <hr/> </div> -Data Morph transforms an input dataset of 2D points into select shapes, while preserving the summary statistics to a given number of decimal points through simulated annealing. +Data Morph transforms an input dataset of 2D points into select shapes, while preserving the summary statistics to a given number of decimal points through simulated annealing. It is intended to be used as a teaching tool to illustrate the importance of data visualization (see the [Data Morph in the Classroom](https://github.com/stefmolin/data-morph/#data-morph-in-the-classroom) section for ideas). <div align="center"> <img alt="Morphing the panda dataset into the star shape." src="https://raw.githubusercontent.com/stefmolin/data-morph/main/docs/_static/panda-to-star-eased.gif"> @@ -156,11 +156,21 @@ In this example, we morphed the built-in panda `Dataset` into the star `Shape`. * The `ShapeFactory.AVAILABLE_SHAPES` attribute contains a list of available shapes, which are also visualized in the `ShapeFactory` documentation. +## Data Morph in the Classroom + +Data Morph is intended to be used as a teaching tool to illustrate the importance of data visualization. Here are some potential classroom activities for instructors: + +- **Statistics Focus**: Have students pick one of the [built-in datasets](https://stefaniemolin.com/data-morph/stable/api/data_morph.data.loader.html#data_morph.data.loader.DataLoader), and morph it into all available [target shapes](https://stefaniemolin.com/data-morph/stable/api/data_morph.shapes.factory.html#data_morph.shapes.factory.ShapeFactory). Ask students to comment on which transformations worked best and why. +- **Creativity Focus**: Have students [create a new dataset](https://stefaniemolin.com/data-morph/stable/custom_datasets.html) (*e.g.*, your school logo or something that the student designs), and morph that into multiple [target shapes](https://stefaniemolin.com/data-morph/stable/api/data_morph.shapes.factory.html#data_morph.shapes.factory.ShapeFactory). Ask students to comment on which transformations worked best and why. +- **Math and Coding Focus**: Have students create a custom [shape](https://stefaniemolin.com/data-morph-talk/#/shape-class-hierarchy) by inheriting from `LineCollection` or `PointCollection` (there will be a tutorial on this in the future), and try morphing a couple of the [built-in datasets](https://stefaniemolin.com/data-morph/stable/api/data_morph.data.loader.html#data_morph.data.loader.DataLoader) into that shape. Ask students to explain how they chose to calculate the shape, and comment on which transformations worked best and why. + +If you end up using Data Morph in your classroom, I would love to hear about it. Please [send me a message](https://stefaniemolin.com/contact/) detailing how you used it and how it went. + ## Acknowledgements 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 and video can be found on the Autodesk Research website [here](https://www.research.autodesk.com/publications/same-stats-different-graphs-generating-datasets-with-varied-appearance-and-identical-statistics-through-simulated-annealing/). The version of the 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). +The paper and video can be found on the Autodesk Research website [here](https://www.research.autodesk.com/publications/same-stats-different-graphs-generating-datasets-with-varied-appearance-and-identical-statistics-through-simulated-annealing/). The version of the 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 codebase, which is on GitHub at [stefmolin/data-morph](https://github.com/stefmolin/data-morph). Read more about the creation of Data Morph [here](https://stefaniemolin.com/articles/data-science/introducing-data-morph/) and [here](https://stefaniemolin.com/data-morph-talk/#/). diff --git a/docs/classroom-ideas.rst b/docs/classroom-ideas.rst new file mode 100644 index 00000000..f1da17c5 --- /dev/null +++ b/docs/classroom-ideas.rst @@ -0,0 +1,26 @@ +Data Morph in the classroom +--------------------------- + +Data Morph is intended to be used as a teaching tool to illustrate the importance +of data visualization. Here are some potential classroom activities for instructors: + +* **Statistics Focus**: Have students pick one of the `built-in datasets + <./api/data_morph.data.loader.html#data_morph.data.loader.DataLoader>`_, + and morph it into all available `target shapes + <./api/data_morph.shapes.factory.html#data_morph.shapes.factory.ShapeFactory>`_. + Ask students to comment on which transformations worked best and why. +* **Creativity Focus**: Have students :doc:`create a new dataset <custom_datasets>` + (*e.g.*, your school logo or something that the student designs), and morph that into multiple + `target shapes <./api/data_morph.shapes.factory.html#data_morph.shapes.factory.ShapeFactory>`_. + Ask students to comment on which transformations worked best and why. +* **Math and Coding Focus**: Have students create a custom `shape + <https://stefaniemolin.com/data-morph-talk/#/shape-class-hierarchy>`_ by inheriting + from :class:`.LineCollection` or :class:`.PointCollection` (there will be a + tutorial on this in the future), and try morphing a couple of the `built-in datasets + <./api/data_morph.data.loader.html#data_morph.data.loader.DataLoader>`_ + into that shape. Ask students to explain how they chose to calculate the shape, and + comment on which transformations worked best and why. + +If you end up using Data Morph in your classroom, I would love to hear about it. Please +`send me a message <https://stefaniemolin.com/contact/>`_ detailing how you used it and +how it went. diff --git a/docs/index.rst b/docs/index.rst index 35f0735e..62c25d59 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,6 +18,8 @@ Data Morph .. include:: quickstart.rst :start-after: .. INSTALLATION +.. include:: classroom-ideas.rst + Citations --------- diff --git a/pyproject.toml b/pyproject.toml index eeff8597..ff8c831e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ maintainers = [ { name = "Stefanie Molin" }, ] authors = [ - { name = "Stefanie Molin", email = "24376333+stefmolin@users.noreply.github.com" }, + { name = "Stefanie Molin", email = "data-morph@stefaniemolin.com" }, { name = "Aaron Stevens", email = "bheklilr2@gmail.com" }, { name = "Justin Matejka", email = "Justin.Matejka@Autodesk.com" }, ] diff --git a/src/data_morph/__init__.py b/src/data_morph/__init__.py index c326b761..425dcb14 100644 --- a/src/data_morph/__init__.py +++ b/src/data_morph/__init__.py @@ -2,7 +2,9 @@ Data Morph. 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. +statistics to a given number of decimal points through simulated annealing. It is intended +to be used as a teaching tool to illustrate the importance of data visualization (see +`Data Morph in the classroom`_ for ideas). Notes ----- @@ -17,7 +19,7 @@ <https://www.research.autodesk.com/publications/same-stats-different-graphs-generating-datasets-with-varied-appearance-and-identical-statistics-through-simulated-annealing/>`_. The version of the 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 +served as the starting point for the Data Morph codebase, which is on GitHub at `stefmolin/data-morph <https://github.com/stefmolin/data-morph>`_. Read more about the creation of Data Morph in `this article