Good day everyone,

I am still an undergrad student so please excuse any elementary questions.

I am busy with a project on trade. The data set has import and export countries (i.e. bilateral) across several years (with year and month columns too), which also shows the different products traded together with their monetary values and quantities. However, it should be noted that the values and quantities are entered on a monthly basis. I created country pairs (and allocated numerical values to these). All I really want to do is create a line graph depicting the trade of the different products for each year with the monthly aggregates of each product within that specific year for the specified country pair. And then, a line graph with the yearly totals for each product trade in the specified country pair.

However, to do this I need to aggregate the monthly values for the specified product and country pair first for the specified year and from a whole lot of Googling, thought I might need to do something with the collapse command.

Any assistance would be greatly appreciated as it is of great urgency.