In [1]:
from pyneurovault.api import *

In [2]:
collections = get_collections()


Extracting NeuroVault collections meta data...
http://neurovault.org/api/collections/?limit=100&format=json
Found 787 results.
Retrieving http://neurovault.org/api/collections/?format=json&limit=100&offset=100
Retrieving http://neurovault.org/api/collections/?format=json&limit=100&offset=200
Retrieving http://neurovault.org/api/collections/?format=json&limit=100&offset=300
Retrieving http://neurovault.org/api/collections/?format=json&limit=100&offset=400
Retrieving http://neurovault.org/api/collections/?format=json&limit=100&offset=500
Retrieving http://neurovault.org/api/collections/?format=json&limit=100&offset=600
Retrieving http://neurovault.org/api/collections/?format=json&limit=100&offset=700

In [3]:
collections


Out[3]:
DOI acquisition_orientation add_date authors autocorrelation_model b0_unwarping_software contributors coordinate_space description doi_add_date ... used_high_pass_filter used_intersubject_registration used_motion_correction used_motion_regressors used_motion_susceptibiity_correction used_orthogonalization used_reaction_time_regressor used_slice_timing_correction used_smoothing used_temporal_derivatives
0 None None 2015-10-02T23:54:43.816421Z None None None None None None ... None None None None None None None None None None
1 None 2014-06-04T02:15:05.515327Z None Some class data used in AFNI bootcamp class None ... None None None None None None None None None None
2 None 2014-06-18T15:40:20.041953Z None None ... None None None None None None None None None None
3 None None 2014-07-30T22:39:46.918965Z None None None None None None ... None None None None None None None None None None
4 None None 2014-07-31T17:04:05.582696Z None None None None None None ... None None None None None None None None None None
5 None None 2014-08-12T08:37:34.607843Z None None None None None None ... None None None None None None None None None None
6 None 2014-08-12T11:35:49.636043Z None None ... None None None None None None None None None None
7 None None 2014-08-12T17:12:55.173918Z None None None None None None ... None None None None None None None None None None
8 None 2015-05-04T17:55:36.378776Z None None ... None None None None None None None None None None
9 None None 2015-12-24T03:53:13.460759Z None None None None None None ... None None None None None None None None None None
10 None None 2015-09-15T14:33:15.777390Z None None None None None None ... None None None None None None None None None None
11 None None 2015-05-06T00:04:33.064787Z None None None None None None ... None None None None None None None None None None
12 None None 2016-08-22T21:43:42.546141Z None None None None None None ... None None None None None None None None None None
13 None None 2015-03-26T23:35:59.454511Z None None None None None None ... None None None None None None None None None None
14 None 2014-08-19T21:30:34.087480Z None Resting state connectivity of music-induced an... None ... None None None None None None None None None None
15 None None 2015-08-09T00:06:12.276281Z None None None None None None ... None None None None None None None None None None
16 None None 2015-11-03T05:14:49.427479Z None None None None None None ... None None None None None None None None None None
17 None None 2015-10-29T12:19:12.421295Z None None None None None None ... None None None None None None None None None None
18 None axial 2014-08-19T23:45:03.141994Z mni Study of music-induced analgesia in fibromyalg... None ... None True True None None None None True True None
19 None None 2015-10-05T08:53:55.176579Z None None None None None None ... None None None None None None None None None None
20 None None 2015-10-12T01:37:37.145778Z None None None None None None ... None None None None None None None None None None
21 10.1038/nn.3673 2014-03-25T20:52:35.182187Z Tom Schonberg, Akram Bakkour, Ashleigh M Hover... None 2014-03-25T20:52:35.182187Z ... None None None None None None None None None None
22 None None 2015-03-10T14:03:16.352681Z None None None None None None ... None None None None None None None None None None
23 None 2015-04-01T22:04:47.630216Z None None ... None None None None None None None None None None
24 10.1073/pnas.0905267106 2016-01-02T04:09:40.658881Z S. M. Smith, P. T. Fox, K. L. Miller, D. C. Gl... None 2016-01-02T04:29:57.184430Z ... None None None None None None None None None None
25 None 2013-06-13T15:30:25.762530Z None None ... None None None None None None None None None None
26 None None 2014-08-11T10:58:26.046529Z None None None None None None ... None None None None None None None None None None
27 10.1038/ncomms8751 2016-05-03T06:38:04.016016Z Fikret Işik Karahanoğlu and Dimitri Van De Ville None 2016-05-03T06:38:04.015516Z ... None None None None None None None None None None
28 None 2014-07-30T17:43:41.267477Z None None ... None None None None None None None None None None
29 None None 2014-07-23T22:26:03.769776Z None None None None None None ... None None None None None None None None None None
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
757 10.1371/journal.pone.0147200 2016-07-04T12:10:46.747050Z Sérgio Gomes da Silva, Alexandre Aparecido de ... None Clinical evidence has shown that physical exer... 2016-07-04T12:10:46.746602Z ... None None None None None None None None None None
758 None None 2016-07-21T16:55:43.620969Z None None None None None None ... None None None None None None None None None None
759 10.1523/JNEUROSCI.4402-15.2016 2016-06-15T19:34:12.828444Z A. de la Vega, L. J. Chang, M. T. Banich, T. D... None 2016-06-15T19:34:12.828013Z ... None None None None None None None None None None
760 10.1002/hbm.23289 2016-08-11T23:28:31.148032Z J. Michael Tyszka and Wolfgang M. Pauli None 2016-08-11T23:28:31.147558Z ... None None None None None None None None None None
761 None None 2016-06-02T18:56:57.630585Z None None None None None None ... None None None None None None None None None None
762 None None 2016-07-21T19:50:03.490807Z None None None None None None ... None None None None None None None None None None
763 None None 2016-09-01T15:26:55.675288Z None None None None None None ... None None None None None None None None None None
764 None None 2016-07-04T14:55:06.649223Z None None None None None None ... None None None None None None None None None None
765 None 2016-08-12T03:25:07.877213Z None This collection contains the images from the p... None ... None None None None None None None None None None
766 10.1371/journal.pone.0140134 2015-09-29T15:22:25.413375Z Ann S. Choe, Craig K. Jones, Suresh E. Joel, J... None We have acquired a longitudinal single-subject... 2016-05-03T11:38:56.980924Z ... None None None None None None None None None None
767 None 2016-06-02T21:12:28.809243Z None These images are the regression parameters fro... None ... None None None None None None None None None None
768 10.1523/JNEUROSCI.4561-15.2016 2016-08-12T14:59:47.270794Z K. L. Campbell, D. Samu, S. W. Davis, L. Geerl... None Unthresholded component maps from the ICA anal... 2016-08-12T14:59:47.270307Z ... None None None None None None None None None None
769 None None 2016-09-01T15:41:19.550773Z None None None None None None ... None None None None None None None None None None
770 10.1016/j.dcn.2016.06.002 2016-08-12T15:44:27.393998Z Tae-Ho Lee and Eva H. Telzer None To see the influences of the functional networ... 2016-08-12T15:44:27.393508Z ... None None None None None None None None None None
771 None None 2016-08-12T22:22:57.724176Z None None None None None None ... None None None None None None None None None None
772 None 2016-07-07T21:34:47.166434Z None We compared resting-state functional connectiv... None ... None None None None None None None None None None
773 None 2016-08-18T17:00:32.427948Z None None ... None None None None None None None None None None
774 None None 2016-08-19T11:32:13.422501Z None None None None None None ... None None None None None None None None None None
775 None None 2016-07-08T08:52:31.794676Z None None None None None None ... None None None None None None None None None None
776 None None 2016-08-15T06:39:08.105284Z None None None None None None ... None None None None None None None None None None
777 None None 2016-08-19T18:18:29.852410Z None None None None None None ... None None None None None None None None None None
778 None None 2016-08-20T21:44:46.989495Z None None None None None None ... None None None None None None None None None None
779 None None 2016-07-09T21:49:20.966178Z None None None None None None ... None None None None None None None None None None
780 10.1002/hbm.21299 2016-08-22T00:41:07.753155Z Thomas Nickl-Jockschat, Ute Habel, Tanja Maria... None This study’s objective was to perform an Anato... 2016-08-22T00:41:07.752618Z ... None None None None None None None None None None
781 None None 2016-07-11T07:15:55.010520Z None None None None None None ... None None None None None None None None None None
782 None None 2016-07-26T13:42:01.521232Z None None None None None None ... None None None None None None None None None None
783 None None 2016-07-26T16:28:03.379419Z None None None None None None ... None None None None None None None None None None
784 10.1016/j.bandl.2015.08.004 2014-10-01T12:42:09.456039Z Torgeir Moberget, Eva Hilland, Stein Andersson... None Functional neuroimaging studies consistently r... 2015-10-30T00:18:50.339407Z ... None None None None None None None None None None
785 10.1016/j.neuroimage.2014.05.023 2015-03-11T19:00:17.646736Z Robert P. Spunt and Ralph Adolphs None The ability to impute mental states to others,... 2015-03-11T19:00:17.646736Z ... None None None None None None None None None None
786 10.1016/j.biopsych.2015.03.027 2015-02-22T20:28:12.235047Z Lars Schulze, Christian Schmahl and Inga Niedt... None Disturbances in the processing and regulation ... 2015-02-22T20:28:12.235047Z ... None None None None None None None None None None

787 rows × 97 columns


In [15]:
data = get_images(limit=100)


Extracting NeuroVault images meta data...
http://neurovault.org/api/images/?limit=100&format=json
Found 14228 results.
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=2900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=3900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=4900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=5900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=6900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=7900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=8900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=9900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=10900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=11900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=12900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=13900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=14000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=14100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=14200

In [21]:
data


Out[21]:
Action Observation Acupuncture Age Anti-Saccades Braille Reading Breath-Holding CIAS Chewing/Swallowing Classical Conditioning Counting/Calculation ... perc_voxels_outside random_property_1 random_property_2 reduced_representation smoothness_fwhm statistic_parameters task thumbnail type url
0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.637650 NaN NaN http://neurovault.org/media/images/2/transform... NaN NaN NaN http://neurovault.org/media/images/2/glass_bra... NaN http://neurovault.org/images/2/
1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/3/transform... NaN NaN NaN http://neurovault.org/media/images/3/glass_bra... NaN http://neurovault.org/images/8719/
2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/3/transform... NaN NaN NaN http://neurovault.org/media/images/3/glass_bra... NaN http://neurovault.org/images/8718/
3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/3/transform... NaN NaN NaN http://neurovault.org/media/images/3/glass_bra... NaN http://neurovault.org/images/5/
4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/3/transform... NaN NaN NaN http://neurovault.org/media/images/3/glass_bra... NaN http://neurovault.org/images/4/
5 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/3/transform... NaN NaN NaN http://neurovault.org/media/images/3/glass_bra... NaN http://neurovault.org/images/3/
6 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 3.764270 NaN NaN http://neurovault.org/media/images/4/transform... NaN NaN NaN http://neurovault.org/media/images/4/glass_bra... NaN http://neurovault.org/images/6/
7 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 1.950965 NaN NaN http://neurovault.org/media/images/7/transform... NaN NaN NaN http://neurovault.org/media/images/7/glass_bra... NaN http://neurovault.org/images/10/
8 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 7.584783 NaN NaN http://neurovault.org/media/images/13/transfor... NaN NaN NaN http://neurovault.org/media/images/13/glass_br... NaN http://neurovault.org/images/21/
9 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 8.284954 NaN NaN http://neurovault.org/media/images/13/transfor... NaN NaN NaN http://neurovault.org/media/images/13/glass_br... NaN http://neurovault.org/images/20/
10 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/13/transfor... NaN NaN NaN http://neurovault.org/media/images/13/glass_br... NaN http://neurovault.org/images/19/
11 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/13/transfor... NaN NaN NaN http://neurovault.org/media/images/13/glass_br... NaN http://neurovault.org/images/18/
12 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.000000 NaN NaN http://neurovault.org/media/images/13/transfor... NaN NaN NaN http://neurovault.org/media/images/13/glass_br... NaN http://neurovault.org/images/17/
13 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 7.813797 NaN NaN http://neurovault.org/media/images/13/transfor... NaN NaN NaN http://neurovault.org/media/images/13/glass_br... NaN http://neurovault.org/images/22/
14 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 1.979114 NaN NaN http://neurovault.org/media/images/14/transfor... 5.0 NaN NaN http://neurovault.org/media/images/14/glass_br... NaN http://neurovault.org/images/23/
15 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/52/
16 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/51/
17 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/50/
18 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/49/
19 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/48/
20 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/46/
21 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.063762 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/43/
22 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.063762 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/39/
23 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.063762 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/37/
24 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/34/
25 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.063762 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/38/
26 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/28/
27 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/32/
28 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/33/
29 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 0.059007 NaN NaN http://neurovault.org/media/images/16/transfor... NaN NaN NaN http://neurovault.org/media/images/16/glass_br... NaN http://neurovault.org/images/29/
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
14198 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 6.581308 NaN NaN http://neurovault.org/media/images/1104/transf... NaN NaN NaN http://neurovault.org/media/images/1104/glass_... NaN http://neurovault.org/images/15021/
14199 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 1.017598 NaN NaN None NaN NaN task001_shapes_vs_baseline http://neurovault.org/media/images/1804/glass_... NaN http://neurovault.org/images/26899/
14200 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 1.017598 NaN NaN http://neurovault.org/media/images/1805/transf... NaN NaN task001_number_vs_baseline http://neurovault.org/media/images/1805/glass_... NaN http://neurovault.org/images/27387/
14201 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 1.017598 NaN NaN http://neurovault.org/media/images/1806/transf... NaN NaN task001_c08_music_vs_baseline http://neurovault.org/media/images/1806/glass_... NaN http://neurovault.org/images/27865/
14202 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12895/
14203 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12899/
14204 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12896/
14205 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12901/
14206 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12890/
14207 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12894/
14208 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12898/
14209 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12897/
14210 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 22.696894 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12900/
14211 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12907/
14212 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12902/
14213 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12904/
14214 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12905/
14215 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12903/
14216 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12911/
14217 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12906/
14218 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12908/
14219 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12912/
14220 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12909/
14221 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12910/
14222 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 100.000000 NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN NaN NaN http://neurovault.org/media/images/877/fsl_cou... NaN http://neurovault.org/images/12913/
14223 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 7.065766 NaN NaN http://neurovault.org/media/images/877/spm_exa... NaN NaN NaN http://neurovault.org/media/images/877/spm_exa... NaN http://neurovault.org/images/12914/
14224 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 24.460595 NaN NaN http://neurovault.org/media/images/890/nidm_00... NaN NaN NaN http://neurovault.org/media/images/890/nidm_00... NaN http://neurovault.org/images/13099/
14225 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 7.065766 NaN NaN http://neurovault.org/media/images/1111/spm_ex... NaN NaN NaN http://neurovault.org/media/images/1111/spm_ex... NaN http://neurovault.org/images/14961/
14226 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 1.017598 NaN NaN None NaN NaN task001_shapes_vs_baseline http://neurovault.org/media/images/1804/glass_... NaN http://neurovault.org/images/26900/
14227 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 1.017598 NaN NaN http://neurovault.org/media/images/1805/transf... NaN NaN task001_number_vs_baseline http://neurovault.org/media/images/1805/glass_... NaN http://neurovault.org/images/27388/

14228 rows × 132 columns


In [4]:
df = get_json_df('images')


http://neurovault.org/api/images/?format=json
Found 14229 results.
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=100
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=200
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=300
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=400
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=500
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=600
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=700
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=800
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=900
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1000
Retrieving http://neurovault.org/api/images/?format=json&limit=100&offset=1100
---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-4-07d260ad9bb2> in <module>()
----> 1 df = get_json_df('images')

/Users/llr14/anaconda/lib/python2.7/site-packages/pyneurovault/utils.pyc in get_json_df(data_type, pks, params, extend_url, debug)
    152         else:
    153             url = "http://neurovault.org/api/%s/%s?%sformat=json" % (data_type, extend_url, params)
--> 154             return pandas.DataFrame(get_json(url))
    155 
    156     else:

/Users/llr14/anaconda/lib/python2.7/site-packages/pyneurovault/utils.pyc in get_json(url)
     94                 print "Retrieving %s" % json_single["next"]
     95                 try:
---> 96                     json_single = get_url(json_single["next"])
     97                     json_single = json.loads(json_single.decode("utf-8"))
     98                     json_all = json_all + json_single['results']

/Users/llr14/anaconda/lib/python2.7/site-packages/pyneurovault/utils.pyc in get_url(url)
     54 def get_url(url):
     55     request = Request(url)
---> 56     response = urlopen(request)
     57     return response.read()
     58 

/Users/llr14/anaconda/lib/python2.7/urllib2.pyc in urlopen(url, data, timeout, cafile, capath, cadefault, context)
    152     else:
    153         opener = _opener
--> 154     return opener.open(url, data, timeout)
    155 
    156 def install_opener(opener):

/Users/llr14/anaconda/lib/python2.7/urllib2.pyc in open(self, fullurl, data, timeout)
    427             req = meth(req)
    428 
--> 429         response = self._open(req, data)
    430 
    431         # post-process response

/Users/llr14/anaconda/lib/python2.7/urllib2.pyc in _open(self, req, data)
    445         protocol = req.get_type()
    446         result = self._call_chain(self.handle_open, protocol, protocol +
--> 447                                   '_open', req)
    448         if result:
    449             return result

/Users/llr14/anaconda/lib/python2.7/urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args)
    405             func = getattr(handler, meth_name)
    406 
--> 407             result = func(*args)
    408             if result is not None:
    409                 return result

/Users/llr14/anaconda/lib/python2.7/urllib2.pyc in http_open(self, req)
   1226 
   1227     def http_open(self, req):
-> 1228         return self.do_open(httplib.HTTPConnection, req)
   1229 
   1230     http_request = AbstractHTTPHandler.do_request_

/Users/llr14/anaconda/lib/python2.7/urllib2.pyc in do_open(self, http_class, req, **http_conn_args)
   1199         else:
   1200             try:
-> 1201                 r = h.getresponse(buffering=True)
   1202             except TypeError: # buffering kw not supported
   1203                 r = h.getresponse()

/Users/llr14/anaconda/lib/python2.7/httplib.pyc in getresponse(self, buffering)
   1134 
   1135         try:
-> 1136             response.begin()
   1137             assert response.will_close != _UNKNOWN
   1138             self.__state = _CS_IDLE

/Users/llr14/anaconda/lib/python2.7/httplib.pyc in begin(self)
    451         # read until we get a non-100 response
    452         while True:
--> 453             version, status, reason = self._read_status()
    454             if status != CONTINUE:
    455                 break

/Users/llr14/anaconda/lib/python2.7/httplib.pyc in _read_status(self)
    407     def _read_status(self):
    408         # Initialize with Simple-Response defaults
--> 409         line = self.fp.readline(_MAXLINE + 1)
    410         if len(line) > _MAXLINE:
    411             raise LineTooLong("header line")

/Users/llr14/anaconda/lib/python2.7/socket.pyc in readline(self, size)
    478             while True:
    479                 try:
--> 480                     data = self._sock.recv(self._rbufsize)
    481                 except error, e:
    482                     if e.args[0] == EINTR:

KeyboardInterrupt: 

In [6]:
!ls


2016-09-06-neurovault_metadata.csv all_tasks.rdf
2016-09-06-pyneurovault.ipynb      all_tasks_parsed.txt
all_concepts.rdf                   cogatlas_explore.ipynb

In [8]:
df = pd.read_csv('2016-09-06-neurovault_metadata.csv')


/Users/llr14/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2723: DtypeWarning: Columns (100,130) have mixed types. Specify dtype option on import or set low_memory=False.
  interactivity=interactivity, compiler=compiler, result=result)

In [28]:
wh = np.where(~np.isnan(df['Acupuncture']))
df.loc[wh].loc[:,'cognitive_contrast_cogatlas']


Out[28]:
3015     NaN
6879     NaN
6914     NaN
6915     NaN
6917     NaN
6918     NaN
6960     NaN
6961     NaN
8366     NaN
8400     NaN
8448     NaN
8502     NaN
8595     NaN
8714     NaN
8734     NaN
8735     NaN
8737     NaN
8738     NaN
8739     NaN
8758     NaN
8759     NaN
8761     NaN
8762     NaN
8763     NaN
8764     NaN
8765     NaN
8766     NaN
8767     NaN
8768     NaN
8777     NaN
8778     NaN
8791     NaN
8832     NaN
8833     NaN
8834     NaN
8842     NaN
8998     NaN
9103     NaN
9206     NaN
9552     NaN
9593     NaN
9711     NaN
9946     NaN
12988    NaN
13323    NaN
13346    NaN
13347    NaN
13348    NaN
13349    NaN
13350    NaN
13368    NaN
13369    NaN
13370    NaN
13371    NaN
13372    NaN
13381    NaN
13382    NaN
13383    NaN
13622    NaN
13742    NaN
Name: cognitive_contrast_cogatlas, dtype: object

In [40]:
cogatlas_col = [c for c in df.columns if 'cogatlas' in c]

In [7]:
import pandas as pd

In [48]:
df[cogatlas_col]


Out[48]:
cognitive_contrast_cogatlas cognitive_contrast_cogatlas_id cognitive_paradigm_cogatlas cognitive_paradigm_cogatlas_id contrast_definition_cogatlas
0 None None None None None
1 parametric loss cnt_4cacee8ad4b14 mixed gambles task trm_4cacee4a1d875 None
2 difference from indifference cnt_5175b81f53bf3 mixed gambles task trm_4cacee4a1d875 None
3 None None mixed gambles task trm_4cacee4a1d875 None
4 parametric gain cnt_5181f79e38fb2 mixed gambles task trm_4cacee4a1d875 None
5 task minus baseline cnt_55ef1305643e9 mixed gambles task trm_4cacee4a1d875 None
6 None None None None
7 None None None None
8 None None None None
9 None None None None
10 None None None None
11 None None None None
12 None None None None
13 None None None None
14 None None None None
15 None None rest eyes open trm_4c8a834779883
16 None None rest eyes open trm_4c8a834779883
17 None None rest eyes open trm_4c8a834779883
18 None None rest eyes open trm_4c8a834779883
19 None None rest eyes open trm_4c8a834779883
20 None None rest eyes open trm_4c8a834779883
21 None None rest eyes open trm_4c8a834779883
22 None None rest eyes open trm_4c8a834779883
23 None None rest eyes open trm_4c8a834779883
24 None None rest eyes open trm_4c8a834779883
25 None None rest eyes open trm_4c8a834779883
26 None None rest eyes open trm_4c8a834779883
27 None None rest eyes open trm_4c8a834779883
28 None None rest eyes open trm_4c8a834779883
29 None None rest eyes open trm_4c8a834779883
... ... ... ... ... ...
14198 None None electric stimulation trm_4e68e08950157 None
14199 None None emotion processing fMRI task paradigm trm_550b5b066d37b None
14200 None None None None None
14201 None None None None None
14202 NaN NaN NaN NaN NaN
14203 NaN NaN NaN NaN NaN
14204 NaN NaN NaN NaN NaN
14205 NaN NaN NaN NaN NaN
14206 NaN NaN NaN NaN NaN
14207 NaN NaN NaN NaN NaN
14208 NaN NaN NaN NaN NaN
14209 NaN NaN NaN NaN NaN
14210 NaN NaN NaN NaN NaN
14211 NaN NaN NaN NaN NaN
14212 NaN NaN NaN NaN NaN
14213 NaN NaN NaN NaN NaN
14214 NaN NaN NaN NaN NaN
14215 NaN NaN NaN NaN NaN
14216 NaN NaN NaN NaN NaN
14217 NaN NaN NaN NaN NaN
14218 NaN NaN NaN NaN NaN
14219 NaN NaN NaN NaN NaN
14220 NaN NaN NaN NaN NaN
14221 NaN NaN NaN NaN NaN
14222 NaN NaN NaN NaN NaN
14223 NaN NaN NaN NaN NaN
14224 NaN NaN NaN NaN NaN
14225 NaN NaN NaN NaN NaN
14226 None None emotion processing fMRI task paradigm trm_550b5b066d37b None
14227 None None None None None

14228 rows × 5 columns


In [77]:
xtab_df = pd.crosstab(df['cognitive_contrast_cogatlas_id'], df['cognitive_paradigm_cogatlas_id'])

In [78]:
xtab_df


Out[78]:
cognitive_paradigm_cogatlas_id None trm_4b7497a289534 trm_4c8989e1f3df7 trm_4c898acd1f28e trm_4c898c0786246 trm_4c898c33ee5f8 trm_4c898c8bf1b4f trm_4c898f079d05e trm_4c89903149aeb trm_4c8990e187dc7 ... tsk_4a57abb949bb1 tsk_4a57abb949bcd tsk_4a57abb949bf6 tsk_4a57abb949d40 tsk_4a57abb949dbb tsk_4a57abb949dd6 tsk_4a57abb949df1 tsk_4a57abb949e1a tsk_4a57abb949e27 tsk_4a57abb949e98
cognitive_contrast_cogatlas_id
None 151 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
Other 2 0 1 0 0 1 3 1 0 0 ... 0 0 0 1 0 0 1 0 1 0
cnt_4b44a4d544ee7 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 4 0 0
cnt_4b4a5473705db 0 0 0 0 0 0 0 0 0 0 ... 0 1 0 0 0 0 0 0 0 0
cnt_4b82d27f31194 0 9 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4c6b5fd5bfc41 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 4 0 0
cnt_4c6b600d4b80f 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 2 0 0
cnt_4cacee8ad4b14 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4cacf26718047 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4d949c8f3101c 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4d949c9b01604 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4de56f7a17762 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4de6b87a44743 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4de6bfac7a994 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4de6c62e9b5da 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4de6d2747197f 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4de96cd8c9aad 0 0 0 0 0 0 2 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4decfedb91973 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4ded2aa1ea79d 0 0 0 0 0 0 0 1 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4dee593ebfcc7 0 0 0 0 0 0 0 0 1 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4deeb0951bd72 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4df28c7e2f855 0 0 0 0 0 0 0 0 0 0 ... 1 0 0 0 0 0 0 0 0 0
cnt_4df689e663ffe 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4df69c712873f 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4df92bccc5ae1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 7 0 0 0 0 0 0
cnt_4dfa94d49dc90 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 4 0 0 0 0
cnt_4dffaa78530b6 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4e00fd3de3b0a 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4e025d8d96ecf 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_4e03b8c2457b4 0 0 0 0 0 0 0 0 0 1 ... 0 0 0 0 0 0 0 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
cnt_553e85d4af020 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e85f11747b 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e85fc78496 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e86042df77 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e860cb6e0a 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e8616191c4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e865074ad4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e865d69738 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e8672a9f1d 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553e868c4a13c 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553ebfc3ab40d 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553fc4f4362c1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_553fc50126261 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55410975ce70b 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_5541098145b5a 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55410992b9c4b 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_554109af50e85 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_554109c5544c8 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55413a0769113 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55413a13ad2fb 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55413a264f834 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55413a3228c77 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_5542665e734fe 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_5542754960e93 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55a301cd38de4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55ef1305643e9 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55ef43b5be6da 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_55ef440b3f6f2 0 0 0 0 1 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
cnt_5679bec3715cd 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
rest_eyes_open 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0

158 rows × 88 columns


In [52]:
%matplotlib inline

In [53]:
from matplotlib import pyplot as plt

In [79]:
fig = plt.figure(figsize=(20, 20))
ax = fig.add_subplot(1, 1, 1)
ax.matshow(xtab_df);



In [80]:
import numpy as np

In [81]:
np.sum(xtab_df, axis=0)


Out[81]:
cognitive_paradigm_cogatlas_id
None                 153
trm_4b7497a289534      9
trm_4c8989e1f3df7      7
trm_4c898acd1f28e      2
trm_4c898c0786246      1
trm_4c898c33ee5f8      1
trm_4c898c8bf1b4f      5
trm_4c898f079d05e      2
trm_4c89903149aeb      1
trm_4c8990e187dc7      1
trm_4c8991c5beb0a      3
trm_4c899211a965c     15
trm_4c8a834779883     72
trm_4c8a8467304e2      9
trm_4c8a84f20dde2      5
trm_4c8a85c5c75eb      7
trm_4cacee4a1d875     11
trm_4cacf22a22d80      8
trm_4cacf3fbc503b     14
trm_4d559bcd67c18     25
trm_4d55a2bbcfdff     10
trm_4d949c5b0e380      2
trm_4da6318f7381b      4
trm_4da6327154fd4     33
trm_4da86cb034ff6      2
trm_4da87f383435b     17
trm_4da88a8e13f26      1
trm_4da890594742a     11
trm_4e6114e7b1ff2      2
trm_4e68e08950157      1
                    ... 
trm_550b54a8b30f4     26
trm_550b557e5f90e     13
trm_550b5a47aa23e      3
trm_550b5b066d37b     23
trm_551b0ee81fb6b     30
trm_553e73e29cf7d     24
trm_553e77e53497d      5
trm_553e85265f51e     21
trm_553ebfc390256      1
trm_553ec64e6cb1b      1
trm_55c686e0824e8      1
trm_55c691909c580      2
tsk_4a57abb949846     11
tsk_4a57abb949923      2
tsk_4a57abb949934      1
tsk_4a57abb9499a8      1
tsk_4a57abb949a0d      2
tsk_4a57abb949a4f      6
tsk_4a57abb949aca      1
tsk_4a57abb949b1c      1
tsk_4a57abb949bb1      1
tsk_4a57abb949bcd      1
tsk_4a57abb949bf6      5
tsk_4a57abb949d40      8
tsk_4a57abb949dbb      6
tsk_4a57abb949dd6      4
tsk_4a57abb949df1      1
tsk_4a57abb949e1a     14
tsk_4a57abb949e27      1
tsk_4a57abb949e98      4
dtype: int64

In [86]:
xtab_df_sumrow = np.sum(xtab_df > 0, axis=1)

In [92]:
len(xtab_df_sumrow)


Out[92]:
158

In [88]:
xtab_df_sumrow[xtab_df_sumrow > 1]


Out[88]:
cognitive_contrast_cogatlas_id
None                  4
Other                28
cnt_523c7d1fc539f     2
dtype: int64

In [90]:
df.ix[df['cognitive_contrast_cogatlas_id'] == 'cnt_523c7d1fc539f', cogatlas_col]


Out[90]:
cognitive_contrast_cogatlas cognitive_contrast_cogatlas_id cognitive_paradigm_cogatlas cognitive_paradigm_cogatlas_id contrast_definition_cogatlas
983 Hyperactivity/Noncompliance cnt_523c7d1fc539f aberrant behavior checklist - community trm_523c7a0a73cf5 None
3650 Hyperactivity/Noncompliance cnt_523c7d1fc539f aberrant behavior checklist - community trm_523c7a0a73cf5 None
3695 Hyperactivity/Noncompliance cnt_523c7d1fc539f aberrant behavior checklist - community trm_523c7a0a73cf5 None
3738 Hyperactivity/Noncompliance cnt_523c7d1fc539f aberrant behavior checklist - community trm_523c7a0a73cf5 None
5930 Hyperactivity/Noncompliance cnt_523c7d1fc539f aberrant behavior checklist - community trm_523c7a0a73cf5 None
12479 Hyperactivity/Noncompliance cnt_523c7d1fc539f aberrant behavior checklist - community trm_523c7a0a73cf5 None
13580 Hyperactivity/Noncompliance cnt_523c7d1fc539f social judgment task trm_4f2453ce33f16 None

In [44]:
df.ix[df['cognitive_contrast_cogatlas']=='task minus baseline',cogatlas_col]


Out[44]:
cognitive_contrast_cogatlas cognitive_contrast_cogatlas_id cognitive_paradigm_cogatlas cognitive_paradigm_cogatlas_id contrast_definition_cogatlas
5 task minus baseline cnt_55ef1305643e9 mixed gambles task trm_4cacee4a1d875 None
10829 task minus baseline cnt_55ef1305643e9 mixed gambles task trm_4cacee4a1d875 None

In [97]:
df.to_csv('2016-09-06-neurovault_metadata.csv', 
          index=False, encoding='utf-8')

In [98]:
!pwd


/Users/contematto/github/notebooks

In [ ]: