# What would be the best way to structure and mine this set of data?

http://pastebin.com/K0eq8cyZ

I went through each season of "It's Always Sunny in Philadelphia" and determined the character groupings (D=Dennis, F=Frank, C=Charlie, M=Mac, B=Sweet Dee) for each episode. I also starred "winners" for some episodes. How best could I organize this data, in what type of database, and what data science tools would extract the most information out of it?

I was thinking of making an SQL table like so:

             (1)     (2)      (3)     (4)     (5)
Episode# | Dennis | Frank | Charlie | Mac | Sweet Dee
008      |    5   |  3,4  |  2,4    | 2,3 |    1
010      |    5   |  3,4,6|  2,4,6  |2,3,6|    1


...where all the values are arrays of ints. 6 represents that the character won the episode and each number represents one of the 5 characters. Thoughts?

• You could certainly use a relational database, but what is the goal; what do you want to know? – Emre Jan 26 '16 at 1:28
• There's no real goal other than detect patterns. For instance, which character combos produce the best episodes? Ultimately I'd have another table with episode data like imdb rating, episode writers, topic tags, etc. Also stuff contained within this dataset alone like what is each characters "affinity" to each other character calculated as a summation of each time they're paired, whether or not they won, etc This is ultimately for fun and practice. Also any ideas on the best way to visually represent this data? Something in Tableau perhaps? – Austin Capobianco Jan 26 '16 at 1:41