"http://data.discogs.com/\n",
"\n",
"\n",
+ "Also look at [How to make a racist AI without really trying](https://gist.github.com/rspeer/ef750e7e407e04894cb3b78a82d66aed), which has some good links for sentiment analysis.\n",
+ "\n",
+ "\n",
"## Contents\n",
"### Data gathering\n",
"\n",
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"# Create a database and a collections within it.\n",
{
"cell_type": "code",
"execution_count": 5,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"def get_artists(artist_name):\n",
{
"cell_type": "code",
"execution_count": 8,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 9,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 10,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
"cell_type": "code",
"execution_count": 11,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 12,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 13,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 14,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 15,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 16,
"metadata": {
- "collapsed": false,
"scrolled": false
},
"outputs": [
{
"cell_type": "code",
"execution_count": 17,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 18,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 20,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 22,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 23,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 24,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 25,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 26,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 31,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 31,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 32,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 52,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 79,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 80,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"for t in tracks.find({}, ['ctitle', 'duration_ms']):\n",
"cell_type": "code",
"execution_count": 81,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [],
{
"cell_type": "code",
"execution_count": 82,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 83,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 84,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 85,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 86,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 88,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 89,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 90,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
"cell_type": "code",
"execution_count": 91,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 92,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 93,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 95,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 97,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 471,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 98,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 99,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 100,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 101,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 102,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 103,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 104,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 105,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 106,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 107,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 108,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 109,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 110,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [],
"cell_type": "code",
"execution_count": 111,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
"cell_type": "code",
"execution_count": 112,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 113,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 114,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 115,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 116,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 117,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"cell_type": "code",
"execution_count": 118,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
"cell_type": "code",
"execution_count": 119,
"metadata": {
- "collapsed": false,
"scrolled": true
},
"outputs": [
{
"cell_type": "code",
"execution_count": 120,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 121,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 122,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"pipeline = [\n",
{
"cell_type": "code",
"execution_count": 123,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
{
"cell_type": "code",
"execution_count": 124,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
}
},
"nbformat": 4,
- "nbformat_minor": 0
+ "nbformat_minor": 1
}