Giter Club home page Giter Club logo

music-routes-data's Introduction

music-routes-data

Music Routes Data: What musicians played on which tracks?

Schema

Data is stored in eight JSON files in the data directory.

Four of the files contain basic data:

  • tracks.json contains the names and unique id string for a track.
  • releases.json contains the names and unique id string for a release.
  • artists.json contains the names and unique id string for an artist.
  • individuals.json contains the names and unique id string for an individual.

Four of the files describe relationships between the basic data and sometimes include extra data relevant to the relationship:

  • artist_track.json contains artistId and trackId pairs where a track is attributed to an artist.
  • individual_artist.json contains individualId and artistId pairs where an individual is a member of an artist.
  • individual_track.json contains individualId and trackId pairs where the individual performed on the track. There is also an optional credits array that explains the person's role on the track (e.g., ["vocals","guitar"]).
  • track_release.json contains trackId and releaseId pairs where a track appears on a release.

License

Music Routes Data by Rich Trott is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Creative Commons License

music-routes-data's People

Contributors

dependabot[bot] avatar semantic-release-bot avatar trott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

music-routes-data's Issues

mongodb compatibility

Add tests to confirm that data can be imported using mongoimport. Great if it could be exported using mongoexport as well. (Can each collection file continue to be an array given the 16 Mb import limit? What will the difference be when mongoexport is called without --jsonArray?)

Release type

Releases need a type code or something so that we can specify if it's a CD, an LP, a 7" single, an EP, a live performance, an Internet download, streaming performance, film, television, etc.

example/load refactoring

example/load should be in a test dir and it should use data.js rather than loading the JSON itself. It should also specify collection names fully, like artist_track rather than at.

npm test out of grunt

Make npm test run grunt, rather than grunt run npm test. This will require us to put the sanity check script into grunt, but that should be easy with grunt-exec which we're already using.

Then npm test can run grunt instead of the sanity check script.

This way, both grunt and npm test will test everything.

And Travis-CI will test everything.

Sample App

Provide a sample app that uses the data.

Input and output directories

Do not set outputDir property or sent dataDir as an option in the Constructor.

Instead, send outputDir as an option for write() and send dataDir as an option for load() (which should be extracted out of the constructor).

There should probably be no default dataDir/outputDir in the data module but possibly in the cli module.

Tool for adding a track

Keep it simple: Just add an entry to tracks.json. Relationships should be handled separately. The programmatic sanity checking is what should protect against partial updates. The tools library should just do tiny things that can be assembled by more sophisticated tools.

CLI search tool context

Should be able to look up an individual and get enough information to determine if it's the person you are actually looking for. For example, if I look up Roger Taylor, it shouldn't just give me people named Roger Taylor. It should give me "Roger Taylor, member of Queen" and "Roger Taylor, member of Duran Duran".

Needs some refactoring so that there's a data object and a cli object.

Concatenator

If we're going to have a big honkin' JSON file, perhaps it should be built from smaller, more manageable JSON files, eh?

It might be tempting to have a releases file, an artist file, etc. But consider if it might make more sense to organize it by artist with each artist having their own file or something like that.

Get rid of fixture for most specs

Instead of a fixture, make Data start with nothing, include a load() method to load from a data directory, and only use a fixture to test the load() function. The CLI may default to the current default data directory. But otherwise, a Data object will just have an empty object. Tests can add the necessary entries themselves to test for rejection of duplicate _ids etc.

This way, the fixture won't become this thing that can never be refactored because you won't know what tests you're making useless, etc.

Programmatic sanity checking

Perhaps via grunt task? Basically enforce rules that a relational database might enforce such as:

  • every entry must have certain required properties
  • If this artist is tied to that album, then that album better think it's tied to this artist

CLI for searching

Should be able to look up an individual and get enough information to determine if it's the person you are actually looking for. For example, if I look up Roger Taylor, it shouldn't just give me people named Roger Taylor. It should give me "Roger Taylor, member of Queen" and "Roger Taylor, member of Duran Duran".

cli add should require an output directory

It exits with a success status code but doesn't actually write anything if no output directory is specified. It should return an error status code and an error message instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.