Skip to content

Commit

Permalink
Add section of potential classroom activities
Browse files Browse the repository at this point in the history
  • Loading branch information
stefmolin committed Aug 30, 2024
1 parent 8c208e3 commit 5e30f67
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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](#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">
Expand Down Expand Up @@ -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. Ask students to comment on which transformations worked best and why.
- **Design and Coding 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. Ask students to comment on which transformations worked best and why.
- **Math and Coding Focus**: Have students create a custom shape (there will be a tutorial in the future) and try morphing a couple of the built-in datasets 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 use Data Morph in your classroom, I would love to hear about it. Please [send me a message](https://stefaniemolin.com/contact/) detailing how you are using it and how it goes.

## 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/#/).

Expand Down
21 changes: 21 additions & 0 deletions docs/classroom-ideas.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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. Ask students to comment on which
transformations worked best and why.
* **Design and Coding 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. Ask students to comment on which transformations worked best and why.
* **Math and Coding Focus**: Have students create a custom shape (there will be a
tutorial in the future) and try morphing a couple of the built-in datasets 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 use Data Morph in your classroom, I would love to hear about it. Please
`send me a message <https://stefaniemolin.com/contact/>`_ detailing how you are using
it and how it goes.
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Data Morph
.. include:: quickstart.rst
:start-after: .. INSTALLATION

.. include:: classroom-ideas.rst

Citations
---------

Expand Down
6 changes: 4 additions & 2 deletions src/data_morph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand All @@ -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
Expand Down

0 comments on commit 5e30f67

Please sign in to comment.