WITS database and Python programming language
You have decided to investigate whether the principle of mirror statistics can in fact be applied in international trade between countries. For that, you decided to choose 5 countries to start your investigation. However, you will need two tools:
A database with import and export data for each country. WITS will be used. A detailed description of WITS is given on the following site:
World Integrated Trade Solution (WITS) | Data on Export, Import, Tariff, NTM (worldbank.org)
A software that allows you to read and process the data. The Python programming language integrated with Google Colab is a free and easy-to-use alternative that will be employed. The following site shows how to start using it:
2.1. Follow the first three steps given:
https://amitness.com/2020/06/google-colaboratory-tips/
2.2. Try to add comments as described in:
2.3. For more details about the Google Colab environment:
https://heartbeat.comet.ml/getting-started-with-google-colab-notebooks-117e2bb0c220
Just to test the knowledge acquired in item 2 try to:
3.1. Create a new notebook in Google Colab as described in item 2.
3.2. Insert a new code in the notebook and insert the following command that will create and show a list of five countries' names:
list_names = ['Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra']
list_names
Click on the play button on the left side of the code and the expected output will be:
['Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra']
3.3. Access the first element of the list using the indexation operator [0]:
list_names[0]
'Afghanistan'
3.4. Access the third element of the list using the indexation operator [2]:
list_names[2]
'Algeria'
3.5. Access the first and second elements of the list using the indexation operator [0:2]. Observe that the third element is not included although the final index is [2]:
list_names[0:2]
['Afghanistan', 'Albania']
3.6. Access the first element of the list using the indexation operator [0] and modify its value to 'Yugoslavia':
list_names[0] = 'Yugoslavia'
3.7. Print the final list just writing the list name:
list_names
The output will be:
['Yugoslavia', 'Albania', 'Algeria', 'American Samoa', 'Andorra']
4. The Python code with all the steps is summarized in this Google Colab (click on the link):
https://colab.research.google.com/drive/1jS-qqZtw-TIRM6gkPsJ-8lVpgl2ClrMr?usp=sharing