Watch
1
0
Fork
You've already forked tate-data
0
mirror of https://github.com/rheaplex/tate-data.git synced 2026-09-16 08:42:07 +00:00
No description
  • JavaScript 99.5%
  • Makefile 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2014-02-05 13:45:17 -08:00
.gitignore Initial revision. 2013-11-07 22:08:56 -08:00
artist-locations.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
artist-locations.js Add headers to csv files. 2014-01-06 11:21:59 -08:00
artist-movements.csv Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
artist-movements.js Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
artist-subjects-corpus.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
artist-subjects-corpus.js Add headers to csv files. 2014-01-06 11:21:59 -08:00
artist-subjects.csv Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
artist-subjects.js Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
artist-titles-corpus.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
artist-titles-corpus.js Add headers to csv files. 2014-01-06 11:21:59 -08:00
artwork-movements.csv Add fields to movemente. 2014-02-05 13:45:17 -08:00
artwork-movements.js Add fields to movemente. 2014-02-05 13:45:17 -08:00
artwork-subjects-corpus.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
artwork-subjects-corpus.js Add headers to csv files. 2014-01-06 11:21:59 -08:00
artwork-subjects-sentiment.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
artwork-subjects-sentiment.js Add headers to csv files. 2014-01-06 11:21:59 -08:00
artwork-subjects.csv Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
artwork-subjects.js Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
artwork-title-sentiment.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
artwork-title-sentiment.js Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
COPYING Initial revision. 2013-11-07 22:08:56 -08:00
Makefile Switch to using MongoDB. Add more csv files. Note that we put more rather than less information into each csv file so we don't have to join them more than needed when loading them to visualize. 2013-12-06 21:24:48 -08:00
movement-artist-links.csv Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
movement-artist-links.js Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
movement-subjects-corpus.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
movement-subjects-corpus.js Add headers to csv files. 2014-01-06 11:21:59 -08:00
movement-subjects.csv Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
movement-subjects.js Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00
movement-titles-corpus.csv Add headers to csv files. 2014-01-06 11:21:59 -08:00
movement-titles-corpus.js Add headers to csv files. 2014-01-06 11:21:59 -08:00
README Fix movement artist links. Give category levels sensible names. 2014-01-06 18:17:09 -08:00

A simple set of scripts to help explore Tate's collection dataset.


* Licensing

Code is GPLv3+, data is CC0 with the exception of location data derived from OpenStreetMap which is ODbL. As a result the following link covers artist-locations.csv only:

http://www.openstreetmap.org/copyright


* Prerequisites

This project requires MongoDB, node.js and the following node libraries:

npm install csv
npm install mongodb
npm install node-geocoder
npm install sentiment
npm install sleep


* Importing The Tate Collection Data Into MongoDB

Check out the Tate collection git project:

https://github.com/tategallery/collection

either directly into this folder, or elsewhere and link it in as "collection":

ln -s ../../path/to/collection

Git will ignore the collection directory.

To import the records into MongoDB you have to feed records in one per line.
Like this:

find collection/artists -name *.json -exec perl -p -e 's/\n/ /' '{}' \; -exec echo \; | mongoimport --db tate --collection artists --stopOnError --drop
find collection/artworks -name *.json -exec perl -p -e 's/\n/ /' '{}' \; -exec echo \; | mongoimport --db tate --collection artworks --stopOnError --drop

Note that this will delete any existing data in these collections.


* Usage

Install the prerequisites, Import the Tate data into MongoDB, then type:

make

This will generate any csv files that don't already exist.

Building the location database takes some time and is error probe. You may need to retry several times before this completes. Progress information and errors are output to stderr. But it's worth running:

node artist-locations.js

before running make, or renaming artist-locations.js to a non-.js extension so it isn't run by make. Geolocations are stored in the database, so this is a one-time hit unless .

If you need to remake them after updating the MongoDB data, type:

make clean
make


* Naming

File names use singular or plural names to indicate whether a property can be multiple.

The "subject" entries for artworks have been named "category", "subcategory" and "subject". These are child, child/child and child/child/child in the json for an artwork respectively. Naming the most specific element of a subject, that is an entity several levels down from an array names "Subjects", as "subject" may be confusing in terms of describing the data structure but is clearer in terms of describing the conceptual hierarchy.