Global Trade Data

by Matei Copot

display Country from Type
display Type from Country
stats on countries based on All items

Data Collection

For a geography project with the purpose of showing the impact that Global Trade (GT) has on our lives, our teacher suggested that his two classes check the location of manufacturing of items (ideally picked at random) in our homes.

The more data we have to analyse, the better, so since we're only 40 students and a reasonable amount of items would bearound the thousands, each of us filled an excel sheet with 25 items, indicating the name of the item and the country of manifacture. After a month we were still missing a few students' entries, but we decided to get on with it anyway, so the teacher put the 800 items from the 32 that managed to submit them.

At this point we had all of the raw data needed, and each student should then analyze it on their own, and since not everyone knows how to program or use the excel conditionals, the excel file was sorted alphabetically to make manual counting slightly easier and sent to every student

Expectations on Data

If we didn’t have a global market, we would probably expect over 90% of the products to be local. But hopefully there will be enough origin diversity to demonstrate the existence of this market. Since our government tries to promote the local producers for the good of the country, transport over short distances is cheaper, and in general there may not be a good reason to import almost the exact same goods from foreign countries, we’d still expect to see more products from the UK than other countries would from us.

Although because we possess a global market, this percentage wouldn’t be nearly as high as 90%: 50% would be more realistic. Then we’d have products coming from a variety of different countries, depending on their distance from us and their size (resources and population). For example Romania may be very good at making electronics, and is quite close to us, but China is much larger, therefore possessing much more man power and resources, bringing the cost of electronics down, almost making transport insignificant since the scale of production is so enormous. We would still see quite a notable amount of goods coming from EU members because of the ease of trade within it, practically bringing the cost of transport to the ground.

In general we can expect various fruits and other products derived from plants to come from the area most favourable to them, for example we wouldn’t have bananas coming from Slovakia, but rather Peru’ or Brazil. Most of the plant-derived products eaten by us come from tropical areas, so it’s fair to say that a lot of the foods will be from Central America. Same goes for any other product that needs materials that we don’t have in the UK, such as all of the complex minerals for electronics, the tropical fish, large quantities of petrol and such.

Or perhaps the products are considered of quality if they were only coming from a certain country, such as Italian sauces/pasta, Romanian cheese/clothes/meat and similar, so we might expect some specific products to come from some specific countries

To sum it up: many items from the UK, others from countries in the EU, electronics from China, growable food from South Africa, and not much from the smaller countries with the exception of specific products.

Data Presentation

The main focus of this is data presentation and visualization. It's all up there, so in this section I'm just going to explain how the algorithm operates and how to use the graphs

How to use

I wanted to show both what kind of countries contained what typologies of items, and the other way around, hence why there are two tabs. To switch between them, just click on them or select what you want from the dropdown menu. You can pick a specific type of item, and it will show you how many items are in that subset, how many countries have items in that subset, and how many items do the countries with the most in them have.

If you'd rather look at all the items, it's as easy as picking "All". The same exact process is applicable to the countries, second tab, where you can see you many countries manufacture that specific type.

Why this type of visualization

It would be fair to ask "why did you not put an 'other' section in the pie chart", but one of the points of the project was to show the huge diversity of origins of certain items, and to show that I put all of the countries in the graph, so you can visually see how many of them are there and how insignificant are they compared to other manufacturers. After a while they would have started to look indistinguishable if it wasn't for the alteret brightness of the slice, so I added that in too.

Maybe a pie chart still isn't the best instrument to visualize variety, but it brings the point across, and since all of my classmates, from what I gather, were going to use pie charts, I might as well do them too, so it would be easier for the teacher to evaluate my work. Also pie charts are pretty, there's no denying that.

The algorithm

Obviously with this type of visualization I have much more room of expression than my classmates, but it wasn't instantaneous, it took me quite a long time to get it to work. I'll quickly present the parts of it that the teacher might be more interested in.

The first thing to do was convert the excel sheet into a format that would be easy to use for making graphs in my favorite programming language. I knew for a fact that when you copy-pasted an excel range (collection of cells) into a plain-text editor (notepad is an example), every column is rapresented by a tab, and each row is represented by a new line (enter). So now I can manipulate this plain-text data into usable "json" data, which can be rearranged however I prefer and easily accessed via JavaScript, the language I'm using

The algorithm to convert all of this can be found in the data.js file, and no, I didn't copy any code from someone else for this mini-project. As for the structure to convert it to, it look somewhat like this:

- data
  - items
    - item (many of them)
      - country
      - name
      - type
  - countries
    - country name : amount of items
  - types
    - type (many of them)
      - countries (see above)
      - name
      - items

It's a lot more complex than that, but what you see above is what it boils down to. I made the whole "data object" accessible in case you want to explore it. Just press F12 (on most browsers) and ESC to open the console. Then you would see some weird text after a ">". Click it and start exploring!

I had to take care of special cases because I didn't want some countries to count as two, for example because of different spellings of congo-kasai, UK and USA, or how the Netherlands is sometimes referred to as Holland. All of this is accounted for in the code, but had to be manually checked beforehand. The teacher also requested that items without a specific country of origin be ignored, such as the ones labelled with EU, Latin/South America or labelled with multiple distant countries such as "China/Usa", so I taught my code to ignore those as well.

Using this algorithm we could expand the original excel sheet and let my program do its magic (heads up for next year's pupils?)

As for the rendering of the graphs, I can't really get into the technicalities, so what I'm going to say will sound really straight forward. All of the code for this can be found in the render.js file.

Web rendering methods provide me a matrix of pixels of which I can decide the color. With some maths I can write text and draw slices of circles. Luckily the basic maths is given to me by the browser, but I still need to tell it where to draw the slices, at what size and color and similar. What I do is sort out the data that I want to be represented into pieces, give each piece a name, a quantity and a color, then make a pie chart and a list out of it. With yet again some maths I get armonic, distinguishible colors, put a name on the middle of the slices if they're big enough (and make sure the text is readable without rotating your monitor), and pick the biggest pieces to be listed on the side

Data Analysis

The graphs mostly reflect what we expected. Most of the imports come from China (24%), with the UK (14%) still significantly contributing. The next 4 countries are all from the EU (Germany, France, Italy and Spain), and 22% of the items come from them. At this point the remaining countries have an almost insignificant contribution, even the imports coming from the USA are no more than 3%.

To note on what each country imports is that 56% of the imports from China are electronics, 52% of Italy's are food, 95% of the ones from Bangladesh are clothes, 51% of the items manufactured in the UK already are food items

When it comes to what country imports the most of each type, we can see that China is still the main clothing source, with 21%, whilst the UK is 10th in that list, showing that only 4% of the clothes we wear seem to come from this country. Still on the clothing subject, we get some interesting countries such as Bangladesh (12%), Vietnam (10%) and Turkey with Pakistan (both at 6%)

69% of our electronics come from China, but we still have some items from the Czech Republic, Hungary and Romania. Second place is given to Germany and Japan, with only 5%, insignificant compared to China.

Luckily enough for us, the majority of the food we eat seems to come from the UK (30%), with Italy and Spain each contributing with a significant 11%. In total, the food items coming from the EU are 71% of all the food items, although we still get 3% of the items from New Zeland and the USA each.

What counted as "machine" was really obscure and we don't have many items under this subset, but according to the data, Germany is the biggest exportee of these items, with 33%. 17% of these items come from the UK, immediately followed by the 16% from China. 70% are from the EU

There's not much to be said about the "other" category, since it deals with every other minute exception, therefore analyzing this is the same as analyzing all of the items, since you're dealing with variety. But I'm going to go ahead and state the statistics anyway: the main "other" importer is China (18%), immediately followed by the UK (16%) until the amounts gradually descend, with 48% of them coming from the EU

Explanations

Most of the results were to be expected by simply considering a global trade model. It seems fair for China to be exporting so much to us, since their population and size are so big, and they're based on communism and industry. Of course they have a considerably huge amount of resources and workers, and with China's infamous labour system they can reach a higher production goal than any other country, and they make use of this.

The reasons a lot of the rest of the imports come from within Europe are the ease of trade thanks to the agreements, and their relative vicinity in space, bringing the costs of transportation and going over borders down by a lot, as well as requiring very little time so the products, if they have an expiry date, can be stored and managed for a longer amount of time. For the same reason, we see less and less items coming from outside Europe, where it may not even be worth competing against european countries for the european market

China seems to mainly export electronics, in huge quantities. This again is likely due to the almost complete lack of materials and workers for electronics in Europe, which they can easily fill with a quite consideraable pay off. One of the main resources available to Italy is food, this is thanks to their climate and traditions more than material resources, which make italian food to be considered of very high quality, proving the part of the "expectations" where I was talking about quality to be true. Apparently Bangladesh's main industry sector is clothes, which was new to me. It's probably because of the large amount of cotton fields and sheep that they posses. Most of the items coming from the UK that we have seem to be food. This is simply because us students were really hungry when collecting the data (or were thinking about food in general), which is a very likely explanation, but there is a secondary explanation: the UK doesn't really have a reason to produce non-food items, since we are more likely to get better quality ones for cheaper from other parts of the world, but food's quality and price is highly dependant on the distance traveled by the it and how old it is, both of which indicate how damaged the food might possibly be. Therefore the sooner it gets to the market and the less it traveled, the better.

China still has the most industries, resources and automation systems, all of which make the huge amount of clothing exports that China makes quite reasonable. What is surprising, instead, is the very small amount of clothes we own that are from the UK, since I would have thought that here we have so many sheep. But it would make sense, since people nowadays prefer cheaper and more synthesized clothes (allowing for more patterns and colors), as reason through when it came to China. Then the other surprising cloth-exporting countries such as Pakistan, Turkey and Vietnam, are likely going to do it because they don't have much else to export: the resources in Turkey and Pakistan are quite scarse, whilst all of the food produced in Vietnam will be heavily damaged by the time it arrives to the UK.

As stated before, China gives us the bigger majority of electronics, no surprise, but why do all other countries export so less of it? Sure, China may have more resources and manpower, but the other countries don't have that much less compared to China, in proportion to the amount they export. I'll speculate that it is because the other countries' market can get more out of other industries, since China is setting such a low price bar, so there is no good reason for them to produce electronics. It is still interesting to see countries from Western Europe in there, even with their few items. This could fit into the same explanation as above: maybe those countries do gain more with electronics than other industries. And although I'm slightly biased, it is true that a lot of the cutting-edge poor-man's research is done there, so they can be selling new products and people are willing to buy them

I did discuss the food before, but one more thing to note is the low quantities of food coming from the USA and New Zeland, because from the explanation I previously gave it would make sense to either have a lot of food coming from a certain country, or none at all. What I didn't take into consideration are high-durability foods, or the excess of corn from the USA that can be preserved (with a monetary gain) with expensive methods for long enough in time and space.

The last two subsets can be disregarded: the meaning of "machines" was quite obscure and we have too few data points, whilst we can't really give an explanation to all of the other types of items, but they both seem to fit in with the general picture: China takes a lot of it, then European countries, and the rest of the world with a lot less. There does seem to be a lot of Germany in "machines", and these items seem to be mainly dish washers, which seems fair because Germany is the main dish washer manifacturer in the EU, and a dish washer from Germany can't be much different from one in China, so there's no reason of them competing

Data Criticisms

To show the existence of global trade consistently, we would of course need a lot more data points, from different locations in the world, but we don't quite have that possibility, since this was a school project. We also need to remind ourselves that we are a European School, and this was the geography lesson for English second language, meaning that the families of the students come from all over Europe.

Therefore, our items are biased on Europe, in that there will be a lot more coming from France, Germany and such, whilst to really show that items from all over the world reach our market, we would need items bought only from common shops in the UK.

Not taking into account the variety of nationalities in our class, there are still various problems. For example we saw that most of the items were food items. This doesn't mean that we buy more food than anything else, but simply that we are teenagers and we end up thinking about food more than electronic pieces, for example.

This skews the whole views on what the countries export the most, because it will be biased on food. There certainly is a balance between how many food, machine, electronics and clothing items we should have chosen to make sure nothing is overrepresented, and to achieve that we'd have to list every single item in our homes, including what we don't see, and sort them by a combination of age, size, and how important are they. Of course this would be too hard to do for what is meant to be a simple geography project.