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%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| artist-locations.csv | ||
| artist-locations.js | ||
| artist-movements.csv | ||
| artist-movements.js | ||
| artist-subjects-corpus.csv | ||
| artist-subjects-corpus.js | ||
| artist-subjects.csv | ||
| artist-subjects.js | ||
| artist-titles-corpus.csv | ||
| artist-titles-corpus.js | ||
| artwork-movements.csv | ||
| artwork-movements.js | ||
| artwork-subjects-corpus.csv | ||
| artwork-subjects-corpus.js | ||
| artwork-subjects-sentiment.csv | ||
| artwork-subjects-sentiment.js | ||
| artwork-subjects.csv | ||
| artwork-subjects.js | ||
| artwork-title-sentiment.csv | ||
| artwork-title-sentiment.js | ||
| COPYING | ||
| Makefile | ||
| movement-artist-links.csv | ||
| movement-artist-links.js | ||
| movement-subjects-corpus.csv | ||
| movement-subjects-corpus.js | ||
| movement-subjects.csv | ||
| movement-subjects.js | ||
| movement-titles-corpus.csv | ||
| movement-titles-corpus.js | ||
| README | ||
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.