Create matrix data from two columns?

D

Dav Bran

Hello Excel Experts,

I've an issue that requires your expertise, as follows:

A MySQL database outputs data about groups members belong
to in two columns, as shown here:

GroupID MemberID
1 35
1 657
2 43
2 57
2 35
3 657
3 43
3 57

It would be useful if this data could be re-sorted into a
matrix format, based on either variable, as shown here:

Count By GroupID (count of how many members groups share)
1 2 3
1 2 1 1
2 1 3 2
3 1 2 3

Count by MemberID (count of how many groups members share)
35 43 57 657
35 2 1 1 1
43 1 2 2 1
57 1 2 2 1
657 1 1 1 2

As you can see, data is repeated in the matrix, so if its
easier to creat just half the matrix, that's fine too. The
goal is to get the data in matrix format for 'social
network' analysis, which requires the format. Once you
have the data in the right format, you can do a lot, but
getting it into that format usually requires hand-coding
or special data collection tools. If you can figure this
out, there are many, many social scientists out there
who'll be able to convert datasets for new analyses, and
who'll sing your praises in the process.

Thanks in advance,
Dav Bran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top