I have a CSV file with millions of lines in the format of the below:
start, finish,count; 101,101,10; 101,103,2; 101,104,8; 102,103,5; So we have a start location, an end location and a count of the number of people who make that journey.
What I'd like to do is put this into a 'table-style' matrix with all the start locations running along the top, all the end locations running down the side and in the body of the matrix have a sum of all the counts that sit within that intersect.
So far I have the CSV file cleaned and imported and have the start and end locations stored as vectors, however I'm unsure how to proceed when forming the body of the matrix, can anyone help?
Thank you.
EDIT: I would like it to look as follows:
101,102; 101,10,0; 103,2,5; 104,8,0; 