Dear All
I am trying to visualise my dataset in such a way that I can show the ranking of production quantities of different fruits and vegetables across EU Member States.
In my database I have 18 different fruit and vegetable products for 27 MS. What I would like is, for each country, to highlight the top 5 products by production quantity.
I have tried the following code:
However, the output does not show the actual production quantities, so it is not very informative.
Something similar to what Nick Cox proposed in post #6 here would be ideal.
Any other idea would be appreciated.
Many thanks in advance for your help.
Best regards,
Federica
I am trying to visualise my dataset in such a way that I can show the ranking of production quantities of different fruits and vegetables across EU Member States.
In my database I have 18 different fruit and vegetable products for 27 MS. What I would like is, for each country, to highlight the top 5 products by production quantity.
I have tried the following code:
Code:
tabplot product MS [aw= productionqty ] if rank<=5, title("Top 5 Products by Country (2023)")
Something similar to what Nick Cox proposed in post #6 here would be ideal.
Any other idea would be appreciated.
Many thanks in advance for your help.
Best regards,
Federica
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(MS product) float(productionqty rank) 1 11 0 18 1 16 0 17 1 3 0 16 1 13 0 15 1 7 0 14 1 10 0 13 1 12 0 12 1 9 0 11 1 8 0 10 1 5 0 9 1 14 1.21 8 1 6 1.24 7 1 18 2.26 6 1 2 4.67 5 1 4 7.28 4 1 15 30.57 3 1 17 56.95 2 1 1 191.91 1 2 9 0 18 2 13 0 17 2 10 0 16 2 5 0 15 2 11 0 14 2 2 0 13 2 8 0 12 2 18 0 11 2 16 0 10 2 12 0 9 2 14 0 8 2 3 0 7 2 7 0 6 2 6 12.28 5 2 4 141.62 4 2 1 203.01 3 2 17 289.7 2 2 15 381.31 1 3 9 0 18 3 13 0 17 3 3 0 16 3 16 0 15 3 10 0 14 3 5 0 13 3 8 .25 12 3 12 .36 11 3 4 2.13 10 3 15 2.51 9 3 6 10.24 8 3 14 10.44 7 3 2 10.84 6 3 7 12.32 5 3 11 29.49 4 3 1 34.93 3 3 18 80.13 2 3 17 85.05 1 4 16 0 18 4 3 0 17 4 5 0 16 4 8 0 15 4 2 .27 14 4 13 .31 13 4 9 .37 12 4 15 .66 11 4 12 1.14 10 4 14 1.57 9 4 6 1.68 8 4 7 1.75 7 4 4 2.12 6 4 11 4.98 5 4 17 17.9 4 4 18 26.44 3 4 10 43.56 2 4 1 61.53 1 5 16 0 18 5 8 .15 17 5 15 .46 16 5 12 .73 15 5 2 .93 14 5 4 1.21 13 5 6 1.46 12 5 14 1.56 11 5 5 1.98 10 5 1 2.9 9 5 7 3.1 8 5 9 4.15 7 5 11 5.5 6 5 3 6.01 5 5 17 12.97 4 5 18 13.06 3 5 10 15.59 2 5 13 15.62 1 6 12 0 18 6 3 0 17 6 10 0 16 6 9 0 15 6 8 0 14 6 11 0 13 6 16 0 12 6 5 0 11 6 6 0 10 6 13 0 9 end label values MS MS label def MS 1 "Austria", modify label def MS 2 "Belgium", modify label def MS 3 "Bulgaria", modify label def MS 4 "Croatia", modify label def MS 5 "Cyprus", modify label def MS 6 "Czechia", modify label values product product label def product 1 "Apples", modify label def product 2 "Apricots", modify label def product 3 "Bananas", modify label def product 4 "Cauliflower and broccoli", modify label def product 5 "Clementines", modify label def product 6 "Eggplants", modify label def product 7 "Grapes for table use", modify label def product 8 "Kiwis", modify label def product 9 "Lemons", modify label def product 10 "Mandarins", modify label def product 11 "Muskmelons", modify label def product 12 "Nectarines", modify label def product 13 "Oranges", modify label def product 14 "Peaches", modify label def product 15 "Pears", modify label def product 16 "Satsumas", modify label def product 17 "Tomatoes for fresh consumption", modify label def product 18 "Watermelons", modify
Comment