Help Creating Tables in with GT

I am wondering if someone can help me create a table that looks like the table I've attached.

In my data set I have 4 variables: year, category, type and value.

I want each year to be a spanner, with the 3 categories as columns within each year and the 5 types to be rows. Please let me know if you can provide any guidance.



To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one: