What is a countries.csv file and how to download it?
A Comma Separated Values (CSV) file is a plain text file that contains data in list form. Each row in the file represents a record or an entry, and each column represents a field or an attribute. The values in each row are separated by commas or other characters called delimiters. CSV files are often used for exchanging data between different applications or programs that can’t open the same file type.
A countries.csv file is a CSV file that contains information about different countries in the world. The information may include country names, country codes, country coordinates, country flags, country populations, country languages, country currencies, etc. A countries.csv file can be useful for various purposes such as data analysis, data visualization, data integration or data validation.
If you want to download a countries.csv file for your own use or project, there are several sources available online that provide such files. In this article, we will show you how to download a countries.csv file from three different sources: Google Developers, DataHub and CopyLists.com. We will also show you how to open and edit a countries.csv file with different programs and tools. Finally, we will discuss the benefits and limitations of using a countries.csv file.
How to download a countries.csv file from Google Developers
Google Developers is a website that provides various resources and tools for developers, such as APIs, libraries, frameworks, documentation, tutorials, etc. One of the resources that Google Developers provides is a canonical dataset of country names and codes in CSV format. This dataset contains 249 rows and 4 columns: name, alpha-2 code, alpha-3 code and numeric code. The dataset follows the ISO 3166-1 standard for country codes.
To download the countries.csv file from Google Developers, you can follow these steps:
- Go to the URL: https://developers.google.com/public-data/docs/canonical/countries_csv
- Right-click on the link that says “Download CSV” and select “Save link as…” or “Save target as…”
- Choose a location on your computer where you want to save the file and click “Save”
Alternatively, you can also copy and paste the URL of the CSV file directly into your browser’s address bar and press “Enter”. The URL is: https://storage.googleapis.com/learn_pd/countries.csv
Here is an example of how the data in the countries.csv file looks like:
Name | Alpha-2 code | Alpha-3 code | Numeric code | ||
---|---|---|---|---|---|
Afghanistan | AF | AFG | 004 | ||
Aland Islands | AX | ALA | 248 | ||
Albania | AL | ALB | 008 | ||
Algeria | DZ | DZA | 012 | ||
American Samoa | AS | ASM | 016 | ||
Andorra | AD | AND | 020 | ||
Angola | AO | AGO | 024 | ||
Anguilla | AI | AIA | AO | AGO | 024 |
Anguilla | Anguilla | AI | AIA | 660 |
You can use the countries.csv file from DataHub for various purposes, such as mapping country names to official names, validating country codes, creating dropdown menus or autocomplete fields, etc.
How to download a countries.csv file from CopyLists.com
CopyLists.com is a website that provides lists of various topics in PDF, Excel and CSV formats. You can find lists of countries, cities, languages, currencies, animals, plants, etc. on this website. One of the lists that CopyLists.com provides is a list of all countries with their 2 digit codes in CSV format. This list contains 249 rows and 2 columns: country name and country code. The list follows the ISO 3166-1 standard for country codes.
To download the countries.csv file from CopyLists.com, you can follow these steps:
- Go to the URL: https://www.copylists.com/list-of-countries-with-2-digit-codes/
- Scroll down to the bottom of the page and click on the “Download CSV” button
- Choose a location on your computer where you want to save the file and click “Save”
Alternatively, you can also copy and paste the URL of the CSV file directly into your browser’s address bar and press “Enter”. The URL is: https://www.copylists.com/wp-content/uploads/2020/07/countries-with-2-digit-codes.csv
Here is an example of how the data in the countries.csv file looks like:
Country Name | Country Code |
---|---|
Afghanistan | AF |
Aland Islands | AX |
Albania | AL |
Algeria |