Colors of Historic Postcards
Wanna take a look at the colors in our historic postcards? Thanks to Laura Wrubel from the George Washington University Libraries in Washington DC, now you can!
We took her code, adapted it to use our postcards as a data source, tweaked the computation algorithm a little, and this is the result:
Details
Laura Wrubel built and shared a Jupyter Notebook, detailing how to download images from the Library of Congress API, how to compute the centroids of 6 color clusters using the k-means clustering algorithm, and how to create a vector graphics representation of that.
If you want to know more about her project for the Library of Congress and her process, take a look at the notebook, the git repository, or take a look at the article she wrote about it.
Tools
The two notebooks we used to create data for the swatch viewer
Description | Link | |
---|---|---|
Create Swatches | Create the color swatches you see above; based on Laura Wrubel's original Notebook | |
Create JSON | The code we used to create the data for this page |
Data Sets
Raw data used for the swatch viewer
Description | Link | |
---|---|---|
Color Data | CSV with ids and hex color codes | |
Color Data and HTML | CSV with ids, hex color codes and pre-generated HTML |