Notebook for Marking Extraction from Panopotes Classification CSV
In [1]:
    
import pandas as pd
import json
    
Read-in and examine content of "classifications" table.
In [2]:
    
classfile_in = 'ap-aas229-test-classifications.csv'
classifications = pd.read_csv(classfile_in)
len(classifications)
    
    Out[2]:
63
In [3]:
    
classifications
    
    Out[3]:
  
    
       
      classification_id 
      user_name 
      user_id 
      user_ip 
      workflow_id 
      workflow_name 
      workflow_version 
      created_at 
      gold_standard 
      expert 
      metadata 
      annotations 
      subject_data 
      subject_ids 
     
  
  
    
      0 
      23386351 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      44.19 
      2016-12-16 08:22:14 UTC 
      NaN 
      NaN 
      {"session":"eb8727582ebc4502bcccd42a749895b17b... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026478":{"retired":null,"NX":"0.5490651","N... 
      5026478 
     
    
      1 
      23386400 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      44.19 
      2016-12-16 08:24:05 UTC 
      NaN 
      NaN 
      {"session":"eb8727582ebc4502bcccd42a749895b17b... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026474":{"retired":null,"NX":"0.60703784","... 
      5026474 
     
    
      2 
      23386545 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      44.19 
      2016-12-16 08:32:11 UTC 
      NaN 
      NaN 
      {"session":"0ab587d4fddac6b1945c84f0c7adc7c9ac... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026484":{"retired":null,"NX":"0.14356157","... 
      5026484 
     
    
      3 
      23386573 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      44.19 
      2016-12-16 08:33:35 UTC 
      NaN 
      NaN 
      {"session":"0ab587d4fddac6b1945c84f0c7adc7c9ac... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026480":{"retired":null,"NX":"0.38636583","... 
      5026480 
     
    
      4 
      23386766 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      44.19 
      2016-12-16 08:41:49 UTC 
      NaN 
      NaN 
      {"session":"0ab587d4fddac6b1945c84f0c7adc7c9ac... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026486":{"retired":null,"NX":"0.2888574","N... 
      5026486 
     
    
      5 
      23386868 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      44.19 
      2016-12-16 08:46:13 UTC 
      NaN 
      NaN 
      {"session":"ed981aba91106cb8b16b8fd53cbb6f0352... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026483":{"retired":null,"NX":"0.44833302","... 
      5026483 
     
    
      6 
      23386909 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      44.19 
      2016-12-16 08:48:11 UTC 
      NaN 
      NaN 
      {"session":"ed981aba91106cb8b16b8fd53cbb6f0352... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026479":{"retired":null,"NX":"0.5490651","N... 
      5026479 
     
    
      7 
      23387182 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      49.26 
      2016-12-16 09:08:49 UTC 
      NaN 
      NaN 
      {"session":"74d7958bc1cf7fffec6aa971102032127f... 
      [{"task":"T1","task_label":"Anything objects t... 
      {"5026476":{"retired":null,"NX":"0.59854376","... 
      5026476 
     
    
      8 
      23387199 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      49.26 
      2016-12-16 09:10:04 UTC 
      NaN 
      NaN 
      {"session":"74d7958bc1cf7fffec6aa971102032127f... 
      [{"task":"T1","task_label":"Anything objects t... 
      {"5026487":{"retired":null,"NX":"0.60703784","... 
      5026487 
     
    
      9 
      23438985 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:33:40 UTC 
      NaN 
      NaN 
      {"session":"cf77e97434f420c85b7e01a8055f34ecb3... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026485":{"retired":null,"NX":"0.35769105","... 
      5026485 
     
    
      10 
      23438988 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:33:57 UTC 
      NaN 
      NaN 
      {"session":"cf77e97434f420c85b7e01a8055f34ecb3... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026475":{"retired":null,"NX":"0.67933244","... 
      5026475 
     
    
      11 
      23438990 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:34:04 UTC 
      NaN 
      NaN 
      {"session":"cf77e97434f420c85b7e01a8055f34ecb3... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026481":{"retired":null,"NX":"0.3950835","N... 
      5026481 
     
    
      12 
      23439014 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:39:51 UTC 
      True 
      owner 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026482":{"retired":null,"NX":"0.51024884","... 
      5026482 
     
    
      13 
      23439016 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:40:06 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026477":{"retired":null,"NX":"0.36072057","... 
      5026477 
     
    
      14 
      23439020 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:40:45 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026488":{"retired":null,"NX":"0.5490651","N... 
      5026488 
     
    
      15 
      23439025 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:41:20 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026473":{"retired":null,"NX":"0.60703784","... 
      5026473 
     
    
      16 
      23439026 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:41:58 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026484":{"retired":null,"NX":"0.14356157","... 
      5026484 
     
    
      17 
      23439027 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:42:09 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026478":{"retired":null,"NX":"0.5490651","N... 
      5026478 
     
    
      18 
      23439029 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:42:32 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026476":{"retired":null,"NX":"0.59854376","... 
      5026476 
     
    
      19 
      23439031 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:42:58 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026480":{"retired":null,"NX":"0.38636583","... 
      5026480 
     
    
      20 
      23439033 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:43:14 UTC 
      NaN 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026481":{"retired":null,"NX":"0.3950835","N... 
      5026481 
     
    
      21 
      23439040 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:44:06 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026473":{"retired":null,"NX":"0.60703784","... 
      5026473 
     
    
      22 
      23439041 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:44:33 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026477":{"retired":null,"NX":"0.36072057","... 
      5026477 
     
    
      23 
      23439044 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:44:56 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026475":{"retired":null,"NX":"0.67933244","... 
      5026475 
     
    
      24 
      23439048 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:45:15 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026482":{"retired":null,"NX":"0.51024884","... 
      5026482 
     
    
      25 
      23439052 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:45:44 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026488":{"retired":null,"NX":"0.5490651","N... 
      5026488 
     
    
      26 
      23439054 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:45:59 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026485":{"retired":null,"NX":"0.35769105","... 
      5026485 
     
    
      27 
      23439059 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:46:32 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026487":{"retired":null,"NX":"0.60703784","... 
      5026487 
     
    
      28 
      23439063 
      lcjohnso 
      63325.0 
      2e6bfd41f3aff7d6cfd6 
      3149 
      Find Clusters 
      57.37 
      2016-12-17 07:47:03 UTC 
      True 
      NaN 
      {"session":"af629460184cd3794cb7d9504e4db468ab... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026473":{"retired":null,"NX":"0.60703784","... 
      5026473 
     
    
      29 
      23733813 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:21:21 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026488":{"retired":null,"NX":"0.5490651","N... 
      5026488 
     
    
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
     
    
      33 
      23733827 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:22:27 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026481":{"retired":null,"NX":"0.3950835","N... 
      5026481 
     
    
      34 
      23733832 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:22:45 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026480":{"retired":null,"NX":"0.38636583","... 
      5026480 
     
    
      35 
      23733837 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:23:07 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026473":{"retired":null,"NX":"0.60703784","... 
      5026473 
     
    
      36 
      23733844 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:23:22 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026482":{"retired":null,"NX":"0.51024884","... 
      5026482 
     
    
      37 
      23733848 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:23:34 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026475":{"retired":null,"NX":"0.67933244","... 
      5026475 
     
    
      38 
      23733853 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:23:45 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026477":{"retired":null,"NX":"0.36072057","... 
      5026477 
     
    
      39 
      23733858 
      lcjohnso 
      63325.0 
      db0276f1091bf1e68cc2 
      3149 
      Find Clusters 
      57.37 
      2016-12-23 18:23:56 UTC 
      NaN 
      NaN 
      {"session":"a1908c477ec427431723bfc32a6b60c004... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026481":{"retired":null,"NX":"0.3950835","N... 
      5026481 
     
    
      40 
      24018724 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:13:30 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026488":{"retired":null,"NX":"0.5490651","N... 
      5026488 
     
    
      41 
      24018726 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:13:41 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026485":{"retired":null,"NX":"0.35769105","... 
      5026485 
     
    
      42 
      24018729 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:13:50 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026476":{"retired":null,"NX":"0.59854376","... 
      5026476 
     
    
      43 
      24018732 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:14:02 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026484":{"retired":null,"NX":"0.14356157","... 
      5026484 
     
    
      44 
      24018734 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:14:19 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026487":{"retired":null,"NX":"0.60703784","... 
      5026487 
     
    
      45 
      24018737 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:14:25 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026483":{"retired":null,"NX":"0.44833302","... 
      5026483 
     
    
      46 
      24018740 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:14:39 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026475":{"retired":null,"NX":"0.67933244","... 
      5026475 
     
    
      47 
      24018743 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:14:45 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026478":{"retired":null,"NX":"0.5490651","N... 
      5026478 
     
    
      48 
      24018748 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:15:10 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026486":{"retired":null,"NX":"0.2888574","N... 
      5026486 
     
    
      49 
      24018753 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:15:20 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026473":{"retired":null,"NX":"0.60703784","... 
      5026473 
     
    
      50 
      24018756 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:15:32 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026482":{"retired":null,"NX":"0.51024884","... 
      5026482 
     
    
      51 
      24018760 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:15:43 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026477":{"retired":null,"NX":"0.36072057","... 
      5026477 
     
    
      52 
      24018765 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2b4b509d09dbda0bc603 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:15:59 UTC 
      NaN 
      NaN 
      {"session":"16f187f54b6a83634409501ba801d5fd44... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026480":{"retired":null,"NX":"0.38636583","... 
      5026480 
     
    
      53 
      24018773 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:17:13 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026478":{"retired":null,"NX":"0.5490651","N... 
      5026478 
     
    
      54 
      24018777 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:17:35 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026473":{"retired":null,"NX":"0.60703784","... 
      5026473 
     
    
      55 
      24018783 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:18:09 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026486":{"retired":null,"NX":"0.2888574","N... 
      5026486 
     
    
      56 
      24018786 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:18:23 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026485":{"retired":null,"NX":"0.35769105","... 
      5026485 
     
    
      57 
      24018790 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:18:41 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026488":{"retired":null,"NX":"0.5490651","N... 
      5026488 
     
    
      58 
      24018793 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:19:05 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026487":{"retired":null,"NX":"0.60703784","... 
      5026487 
     
    
      59 
      24018796 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:19:14 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026484":{"retired":null,"NX":"0.14356157","... 
      5026484 
     
    
      60 
      24018800 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:19:23 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026483":{"retired":null,"NX":"0.44833302","... 
      5026483 
     
    
      61 
      24018803 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:19:31 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026476":{"retired":null,"NX":"0.59854376","... 
      5026476 
     
    
      62 
      24018806 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2e99336269d34964aebb 
      3149 
      Find Clusters 
      57.37 
      2016-12-31 19:19:42 UTC 
      NaN 
      NaN 
      {"session":"7130ec8383e4f1cf5ae6d7df9585466252... 
      [{"task":"T0","task_label":"Draw circles aroun... 
      {"5026475":{"retired":null,"NX":"0.67933244","... 
      5026475 
     
  
63 rows × 14 columns
Read-in and examine content of "subjects" and "workflows" table.
In [4]:
    
subjectsfile_in = 'ap-aas229-test-subjects.csv'
subjects = pd.read_csv(subjectsfile_in)
workflowsfile_in = 'ap-aas229-test-workflows.csv'
workflows = pd.read_csv(workflowsfile_in)
    
In [5]:
    
subjects
    
    Out[5]:
  
    
       
      subject_id 
      project_id 
      workflow_ids 
      subject_set_ids 
      metadata 
      locations 
      classifications_by_workflow 
      retired_in_workflow 
     
  
  
    
      0 
      5026473 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.60703784","NY":"0.9055836","!RA":"11.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      1 
      5026475 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.67933244","NY":"0.8019534","!RA":"10.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      2 
      5026476 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.59854376","NY":"0.6871925","!RA":"11.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      3 
      5026477 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.36072057","NY":"0.5484215","!RA":"11.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      4 
      5026478 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.5490651","NY":"0.40016833","!RA":"11.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      5 
      5026480 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.38636583","NY":"0.38113895","!RA":"11... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      6 
      5026481 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.3950835","NY":"0.3832495","!RA":"11.4... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      7 
      5026482 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.51024884","NY":"0.26873538","!RA":"11... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      8 
      5026483 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.44833302","NY":"0.26383436","!RA":"11... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      9 
      5026484 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.14356157","NY":"0.21191244","!RA":"11... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      10 
      5026485 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.35769105","NY":"0.14440192","!RA":"11... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      11 
      5026486 
      3627 
      [3149] 
      [7408] 
      {"NX":"0.2888574","NY":"0.09115138","!RA":"11.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      12 
      5026487 
      3627 
      [3149] 
      [7409] 
      {"NX":"0.60703784","NY":"0.9055836","!RA":"11.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
    
      13 
      5026488 
      3627 
      [3149] 
      [7409] 
      {"NX":"0.5490651","NY":"0.40016833","!RA":"11.... 
      {"0":"https://panoptes-uploads.zooniverse.org/... 
      {"3149":6} 
      [] 
     
  
In [6]:
    
workflows
    
    Out[6]:
  
    
       
      workflow_id 
      display_name 
      version 
      active 
      classifications_count 
      pairwise 
      grouped 
      prioritized 
      primary_language 
      first_task 
      tutorial_subject_id 
      retired_set_member_subjects_count 
      tasks 
      retirement 
      aggregation 
     
  
  
    
      0 
      3149 
      Find Clusters 
      57 
      True 
      57 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"options":{"count":8},"criteria":"classificat... 
      {} 
     
    
      1 
      3149 
      Find Clusters 
      56 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      2 
      3149 
      Find Clusters 
      55 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      3 
      3149 
      Find Clusters 
      54 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      4 
      3149 
      Find Clusters 
      53 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      5 
      3149 
      Find Clusters 
      52 
      True 
      0 
      False 
      False 
      False 
      en 
      T1 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      6 
      3149 
      Find Clusters 
      51 
      True 
      0 
      False 
      False 
      False 
      en 
      T1 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      7 
      3149 
      Find Clusters 
      50 
      True 
      0 
      False 
      False 
      False 
      en 
      T1 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      8 
      3149 
      Find Clusters 
      49 
      True 
      0 
      False 
      False 
      False 
      en 
      T1 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      9 
      3149 
      Find Clusters 
      48 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      10 
      3149 
      Find Clusters 
      47 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      11 
      3149 
      Find Clusters 
      46 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      12 
      3149 
      Find Clusters 
      45 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      13 
      3149 
      Find Clusters 
      44 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      14 
      3149 
      Find Clusters 
      43 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      15 
      3149 
      Find Clusters 
      42 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      16 
      3149 
      Find Clusters 
      41 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      17 
      3149 
      Find Clusters 
      40 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      18 
      3149 
      Find Clusters 
      39 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      19 
      3149 
      Find Clusters 
      38 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      20 
      3149 
      Find Clusters 
      37 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      21 
      3149 
      Find Clusters 
      36 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      22 
      3149 
      Find Clusters 
      35 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      23 
      3149 
      Find Clusters 
      34 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      24 
      3149 
      Find Clusters 
      33 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      25 
      3149 
      Find Clusters 
      32 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      26 
      3149 
      Find Clusters 
      31 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      27 
      3149 
      Find Clusters 
      30 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      28 
      3149 
      Find Clusters 
      29 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      29 
      3149 
      Find Clusters 
      28 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      30 
      3149 
      Find Clusters 
      27 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      31 
      3149 
      Find Clusters 
      26 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      32 
      3149 
      Find Clusters 
      25 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      33 
      3149 
      Find Clusters 
      24 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      34 
      3149 
      Find Clusters 
      23 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      35 
      3149 
      Find Clusters 
      22 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      36 
      3149 
      Find Clusters 
      21 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      37 
      3149 
      Find Clusters 
      20 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      38 
      3149 
      Find Clusters 
      19 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      39 
      3149 
      Find Clusters 
      18 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      40 
      3149 
      Find Clusters 
      17 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      41 
      3149 
      Find Clusters 
      16 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      42 
      3149 
      Find Clusters 
      15 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      43 
      3149 
      Find Clusters 
      14 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      44 
      3149 
      Find Clusters 
      13 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      45 
      3149 
      Find Clusters 
      12 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      46 
      3149 
      Find Clusters 
      11 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      47 
      3149 
      Find Clusters 
      10 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      48 
      3149 
      Find Clusters 
      9 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      49 
      3149 
      Find Clusters 
      8 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      50 
      3149 
      Find Clusters 
      7 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      51 
      3149 
      Find Clusters 
      6 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      52 
      3149 
      Find Clusters 
      5 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      53 
      3149 
      Find Clusters 
      4 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      54 
      3149 
      Find Clusters 
      3 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      55 
      3149 
      Find Clusters 
      2 
      True 
      0 
      False 
      False 
      False 
      en 
      T0 
      NaN 
      0 
      {"T0":{"help":"T0.help","type":"drawing","tool... 
      {"criteria":"classification_count","options":{... 
      {} 
     
    
      56 
      3149 
      Find Clusters 
      1 
      True 
      0 
      False 
      False 
      False 
      en 
      NaN 
      NaN 
      0 
      {} 
      {"criteria":"classification_count","options":{... 
      {} 
     
  
Expanding JSON Fields
These commands converts JSON strings into python dictionaries, providing access to key-value pairs.
In [7]:
    
classifications['metadata_json'] = [json.loads(q) for q in classifications.metadata]
classifications['annotations_json'] = [json.loads(q) for q in classifications.annotations]
classifications['subject_data_json'] = [json.loads(q) for q in classifications.subject_data]
    
Understanding the fields of the annotations data:
table | table column | classification index | task index | task column = value | marking index | marking column = data
In [8]:
    
classifications['annotations_json'][1][0]['value'][1]
    
    Out[8]:
{'angle': -3.945186229037537,
 'details': [],
 'frame': 0,
 'r': 31.63960131428278,
 'tool': 1,
 'tool_label': 'Background Galaxy',
 'x': 423.2312925170068,
 'y': 169.79591836734696}
In [9]:
    
classifications['annotations_json'][1][0]['value'][0]['x']
    
    Out[9]:
375.3401360544218
Creating a new column based on classification data:
In [10]:
    
classifications['n_markings'] = [ len(q[0]['value']) for q in classifications.annotations_json ]
    
Helpful (optional) subselection of classification data: only work with data from most recent version of site & workflow.
In [11]:
    
iclass = classifications[classifications.workflow_version == classifications['workflow_version'].max()]
len(iclass)
    
    Out[11]:
54
Creating A New Output File
In [12]:
    
# output markings from 31 classifications in iclass to csv
clist=[]
for index, c in iclass.iterrows():
    if c['n_markings'] > 0:
        for q in c.annotations_json[0]['value']:
            clist.append({'classification_id':c.classification_id, 'user_name':c.user_name, 'user_id':c.user_id,
                          'created_at':c.created_at, 'subject_ids':c.subject_ids, 'tool':q['tool'], 
                          'tool_label':q['tool_label'], 'x':q['x'], 'y':q['y'], 'r':q['r'], 'frame':q['frame']})
col_order=['classification_id','user_name','user_id','created_at','subject_ids',
           'tool','tool_label','x','y','r','frame']
out=pd.DataFrame(clist)[col_order]
    
In [13]:
    
out
    
    Out[13]:
  
    
       
      classification_id 
      user_name 
      user_id 
      created_at 
      subject_ids 
      tool 
      tool_label 
      x 
      y 
      r 
      frame 
     
  
  
    
      0 
      23438985 
      lcjohnso 
      63325.0 
      2016-12-17 07:33:40 UTC 
      5026485 
      0 
      Cluster 
      427.786372 
      42.646359 
      28.665652 
      0 
     
    
      1 
      23438988 
      lcjohnso 
      63325.0 
      2016-12-17 07:33:57 UTC 
      5026475 
      0 
      Cluster 
      189.169840 
      98.492781 
      36.285083 
      0 
     
    
      2 
      23438990 
      lcjohnso 
      63325.0 
      2016-12-17 07:34:04 UTC 
      5026481 
      0 
      Cluster 
      282.585673 
      242.678090 
      41.828625 
      0 
     
    
      3 
      23439014 
      lcjohnso 
      63325.0 
      2016-12-17 07:39:51 UTC 
      5026482 
      1 
      Background Galaxy 
      612.587260 
      300.555291 
      202.477933 
      0 
     
    
      4 
      23439016 
      lcjohnso 
      63325.0 
      2016-12-17 07:40:06 UTC 
      5026477 
      0 
      Cluster 
      137.384975 
      154.339204 
      74.815673 
      1 
     
    
      5 
      23439020 
      lcjohnso 
      63325.0 
      2016-12-17 07:40:45 UTC 
      5026488 
      0 
      Cluster 
      152.615818 
      182.770109 
      42.803214 
      0 
     
    
      6 
      23439020 
      lcjohnso 
      63325.0 
      2016-12-17 07:40:45 UTC 
      5026488 
      1 
      Background Galaxy 
      318.124306 
      101.538950 
      20.709963 
      1 
     
    
      7 
      23439025 
      lcjohnso 
      63325.0 
      2016-12-17 07:41:20 UTC 
      5026473 
      0 
      Cluster 
      376.001507 
      185.816278 
      29.568588 
      0 
     
    
      8 
      23439025 
      lcjohnso 
      63325.0 
      2016-12-17 07:41:20 UTC 
      5026473 
      1 
      Background Galaxy 
      423.724814 
      169.570046 
      11.215344 
      0 
     
    
      9 
      23439025 
      lcjohnso 
      63325.0 
      2016-12-17 07:41:20 UTC 
      5026473 
      1 
      Background Galaxy 
      330.308980 
      457.940663 
      14.644156 
      0 
     
    
      10 
      23439025 
      lcjohnso 
      63325.0 
      2016-12-17 07:41:20 UTC 
      5026473 
      1 
      Background Galaxy 
      5.384341 
      359.447882 
      14.215453 
      0 
     
    
      11 
      23439029 
      lcjohnso 
      63325.0 
      2016-12-17 07:42:32 UTC 
      5026476 
      0 
      Cluster 
      430.832540 
      196.985562 
      175.674121 
      1 
     
    
      12 
      23439031 
      lcjohnso 
      63325.0 
      2016-12-17 07:42:58 UTC 
      5026480 
      2 
      Other Object 
      202.369903 
      146.216088 
      61.462525 
      0 
     
    
      13 
      23439033 
      lcjohnso 
      63325.0 
      2016-12-17 07:43:14 UTC 
      5026481 
      0 
      Cluster 
      281.570284 
      238.616532 
      54.915583 
      0 
     
    
      14 
      23439040 
      lcjohnso 
      63325.0 
      2016-12-17 07:44:06 UTC 
      5026473 
      0 
      Cluster 
      377.016897 
      185.816278 
      32.269583 
      0 
     
    
      15 
      23439040 
      lcjohnso 
      63325.0 
      2016-12-17 07:44:06 UTC 
      5026473 
      1 
      Background Galaxy 
      424.740203 
      170.585436 
      14.215453 
      0 
     
    
      16 
      23439040 
      lcjohnso 
      63325.0 
      2016-12-17 07:44:06 UTC 
      5026473 
      1 
      Background Galaxy 
      329.293590 
      455.909884 
      16.246232 
      0 
     
    
      17 
      23439040 
      lcjohnso 
      63325.0 
      2016-12-17 07:44:06 UTC 
      5026473 
      1 
      Background Galaxy 
      7.415120 
      362.494050 
      20.307790 
      0 
     
    
      18 
      23439041 
      lcjohnso 
      63325.0 
      2016-12-17 07:44:33 UTC 
      5026477 
      0 
      Cluster 
      133.323417 
      154.339204 
      58.161525 
      0 
     
    
      19 
      23439044 
      lcjohnso 
      63325.0 
      2016-12-17 07:44:56 UTC 
      5026475 
      0 
      Cluster 
      192.216008 
      96.462002 
      48.249702 
      0 
     
    
      20 
      23439048 
      lcjohnso 
      63325.0 
      2016-12-17 07:45:15 UTC 
      5026482 
      1 
      Background Galaxy 
      610.556481 
      304.616849 
      201.623221 
      0 
     
    
      21 
      23439052 
      lcjohnso 
      63325.0 
      2016-12-17 07:45:44 UTC 
      5026488 
      0 
      Cluster 
      154.646597 
      184.800888 
      41.120141 
      0 
     
    
      22 
      23439052 
      lcjohnso 
      63325.0 
      2016-12-17 07:45:44 UTC 
      5026488 
      1 
      Background Galaxy 
      320.155085 
      101.538950 
      14.142739 
      1 
     
    
      23 
      23439059 
      lcjohnso 
      63325.0 
      2016-12-17 07:46:32 UTC 
      5026487 
      0 
      Cluster 
      379.047676 
      185.816278 
      34.894551 
      0 
     
    
      24 
      23439059 
      lcjohnso 
      63325.0 
      2016-12-17 07:46:32 UTC 
      5026487 
      0 
      Cluster 
      263.293273 
      256.893543 
      36.242436 
      0 
     
    
      25 
      23439059 
      lcjohnso 
      63325.0 
      2016-12-17 07:46:32 UTC 
      5026487 
      1 
      Background Galaxy 
      424.740203 
      169.570046 
      11.169284 
      1 
     
    
      26 
      23439059 
      lcjohnso 
      63325.0 
      2016-12-17 07:46:32 UTC 
      5026487 
      1 
      Background Galaxy 
      328.278201 
      456.925274 
      17.261621 
      1 
     
    
      27 
      23439059 
      lcjohnso 
      63325.0 
      2016-12-17 07:46:32 UTC 
      5026487 
      1 
      Background Galaxy 
      5.384341 
      360.463271 
      16.246232 
      1 
     
    
      28 
      23439063 
      lcjohnso 
      63325.0 
      2016-12-17 07:47:03 UTC 
      5026473 
      0 
      Cluster 
      377.016897 
      185.816278 
      30.881866 
      0 
     
    
      29 
      23439063 
      lcjohnso 
      63325.0 
      2016-12-17 07:47:03 UTC 
      5026473 
      1 
      Background Galaxy 
      423.724814 
      169.570046 
      11.352400 
      0 
     
    
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
      ... 
     
    
      50 
      24018734 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:14:19 UTC 
      5026487 
      0 
      Cluster 
      262.277884 
      258.924322 
      39.600190 
      0 
     
    
      51 
      24018740 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:14:39 UTC 
      5026475 
      0 
      Cluster 
      187.139061 
      99.508171 
      44.861374 
      0 
     
    
      52 
      24018748 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:15:10 UTC 
      5026486 
      1 
      Background Galaxy 
      523.232984 
      158.400762 
      38.584801 
      0 
     
    
      53 
      24018748 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:15:10 UTC 
      5026486 
      1 
      Background Galaxy 
      438.955656 
      331.016976 
      177.487063 
      0 
     
    
      54 
      24018748 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:15:10 UTC 
      5026486 
      1 
      Background Galaxy 
      357.724496 
      485.356180 
      98.319909 
      0 
     
    
      55 
      24018753 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:15:20 UTC 
      5026473 
      0 
      Cluster 
      378.032286 
      184.800888 
      40.168891 
      0 
     
    
      56 
      24018756 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:15:32 UTC 
      5026482 
      1 
      Background Galaxy 
      614.618039 
      305.632239 
      202.531392 
      0 
     
    
      57 
      24018760 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:15:43 UTC 
      5026477 
      0 
      Cluster 
      132.308028 
      155.354593 
      61.344990 
      0 
     
    
      58 
      24018765 
      not-logged-in-2b4b509d09dbda0bc603 
      NaN 
      2016-12-31 19:15:59 UTC 
      5026480 
      2 
      Other Object 
      206.431461 
      143.169919 
      65.530000 
      0 
     
    
      59 
      24018773 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:17:13 UTC 
      5026478 
      1 
      Background Galaxy 
      318.124306 
      101.538950 
      24.369348 
      0 
     
    
      60 
      24018777 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:17:35 UTC 
      5026473 
      0 
      Cluster 
      377.016897 
      184.800888 
      38.222368 
      0 
     
    
      61 
      24018777 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:17:35 UTC 
      5026473 
      1 
      Background Galaxy 
      422.709424 
      169.570046 
      18.277011 
      0 
     
    
      62 
      24018777 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:17:35 UTC 
      5026473 
      1 
      Background Galaxy 
      330.308980 
      455.909884 
      25.566854 
      0 
     
    
      63 
      24018777 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:17:35 UTC 
      5026473 
      1 
      Background Galaxy 
      7.415120 
      360.463271 
      29.446295 
      0 
     
    
      64 
      24018777 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:17:35 UTC 
      5026473 
      1 
      Background Galaxy 
      497.848247 
      38.584801 
      29.446295 
      0 
     
    
      65 
      24018783 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:18:09 UTC 
      5026486 
      1 
      Background Galaxy 
      523.232984 
      158.400762 
      46.707917 
      0 
     
    
      66 
      24018783 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:18:09 UTC 
      5026486 
      1 
      Background Galaxy 
      358.739886 
      484.340790 
      103.075788 
      0 
     
    
      67 
      24018783 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:18:09 UTC 
      5026486 
      1 
      Background Galaxy 
      440.986435 
      336.093924 
      183.855609 
      0 
     
    
      68 
      24018783 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:18:09 UTC 
      5026486 
      0 
      Cluster 
      263.293273 
      332.032366 
      33.260788 
      0 
     
    
      69 
      24018790 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:18:41 UTC 
      5026488 
      0 
      Cluster 
      154.646597 
      183.785499 
      47.561000 
      0 
     
    
      70 
      24018790 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:18:41 UTC 
      5026488 
      1 
      Background Galaxy 
      319.139695 
      99.508171 
      27.621581 
      1 
     
    
      71 
      24018793 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:05 UTC 
      5026487 
      0 
      Cluster 
      378.032286 
      182.770109 
      38.235853 
      0 
     
    
      72 
      24018793 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:05 UTC 
      5026487 
      0 
      Cluster 
      265.324052 
      258.924322 
      40.666318 
      0 
     
    
      73 
      24018793 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:05 UTC 
      5026487 
      1 
      Background Galaxy 
      496.832857 
      39.600190 
      28.430906 
      1 
     
    
      74 
      24018793 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:05 UTC 
      5026487 
      1 
      Background Galaxy 
      423.724814 
      169.570046 
      18.277011 
      1 
     
    
      75 
      24018793 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:05 UTC 
      5026487 
      1 
      Background Galaxy 
      327.262811 
      456.925274 
      29.880758 
      1 
     
    
      76 
      24018793 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:05 UTC 
      5026487 
      1 
      Background Galaxy 
      5.384341 
      359.447882 
      28.430906 
      1 
     
    
      77 
      24018800 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:23 UTC 
      5026483 
      1 
      Background Galaxy 
      162.769713 
      267.047438 
      43.661748 
      0 
     
    
      78 
      24018803 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:31 UTC 
      5026476 
      0 
      Cluster 
      425.755593 
      194.954783 
      160.957652 
      0 
     
    
      79 
      24018806 
      not-logged-in-2e99336269d34964aebb 
      NaN 
      2016-12-31 19:19:42 UTC 
      5026475 
      0 
      Cluster 
      190.185229 
      98.492781 
      48.494815 
      1 
     
  
80 rows × 11 columns
In [14]:
    
out.to_csv('ap-aas229-test-markings.csv',index_label='mark_id')
    
Make Overlay Images
In [15]:
    
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
    
In [16]:
    
# Unique Subjects
usub = classifications.drop_duplicates(subset='subject_ids')
len(usub)
    
    Out[16]:
16
In [17]:
    
# Make Images
# Select Subject Index Number
subsel=12
marks = out[out.subject_ids == usub.subject_ids[subsel]]
imgnm = list(json.loads(usub.subject_data[subsel]).values())[0]['IMG_COLOR']
imgpath='../ap_sampledata/'
imgfile=imgpath+imgnm
fig, ax = plt.subplots()
im = plt.imread(imgfile)
ax.imshow(im)
for index, m in marks.iterrows():
    if m.tool == 0:
        ax.add_artist(plt.Circle( (m.x, m.y), m.r, color='b', fill=False))
    if m.tool == 1:
        ax.add_artist(plt.Circle( (m.x, m.y), m.r, color='r', fill=False))
    if m.tool > 1:
        ax.add_artist(plt.Circle( (m.x, m.y), m.r, color='g', fill=False))
plt.axis('off')
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
plt.savefig('out_'+imgnm, dpi=120, bbox_inches='tight', pad_inches=0)
    
    
 
In [ ]:
    
    
Content source: lcjohnso/Panoptes_MarkingExport
Similar notebooks: