7. Country flag and errors file - SheilaOM/TFG GitHub Wiki

Country flag

Next to the name or twitter of each participant, is added the flag of the country to which it belongs. To do this, use the nationality column of the data sheet.

The icons of the flags of all countries have been obtained from the web http://www.famfamfam.com/lab/icons/flags/, which are royalty-free images and are also small icons, perfect for the use I want to give them.

These icons are named with the country name in ISO 3166-1 alpha-2 code. To transform the nationality that I take from the list of data to this code, I use the package pycountry.

As in this case the nationality has written each participant by hand, some of them have put the nationality (Spanish) and others have put the country (Spain). In a better version will only appear in the country, so I only will contemplate this case. In cases where a country doesn't appear in this field, don't set flag.


Errors file

In some cases, when reading the data, it doesn't do so correctly because some data are incorrect, and they must be corrected or entered by hand. Therefore, I detect the cases in which this occurs and generate a file of errors in which it indicates which error has occurred and from which participant.


Link to commit of flag and errors file