I looking for Shapefile of a World countries having an attribute of the national currency, do you know how can I get that ?

  • As in "this is UK, national currency is pound"?
    – Erik
    Aug 22, 2019 at 15:37
  • 1
    Your best bet is probably to just use a shapefile of country borders and then join or relate a table of currency type by country.
    – lambertj
    Aug 22, 2019 at 15:50
  • @lambertj I guess so sir, I just wanted to know if it was already avalaible in some Website
    – Eliasse
    Aug 22, 2019 at 15:57
  • 2
    If it’s open data that you seek then I think the place to ask is the Open Data Stack Exchange.
    – PolyGeo
    Aug 22, 2019 at 20:29
  • I did not know it, thanks a lot !
    – Eliasse
    Aug 23, 2019 at 16:50

1 Answer 1


Here is how I made the file for you:

  1. Got tabular data with country names, currency, and currency code from github here: https://gist.github.com/HarishChaudhari/4680482#file-country-code-to-currency-code-mapping-csv

  2. Downloaded country layer from ESRI here:https://hub.arcgis.com/datasets/a21fdb46d23e4ef896f31475217cbb08_1

  3. Change ESRI .dbf table to .csv table, edit name fields so that they match in both tables.

  4. Merge tables using common ID field in R, then export table as .dbf using package foreign to overwrite the orginal .dbf.

#input tables
df.1 <- read.csv('countries.csv')
df.2 <- read.csv('currency.csv')
#Join tables
m = merge(df.1, df.2, by="Country")
#overwrite attribute table
write.dbf(m, file = "Countries_WGS84.dbf")

Here is the link to the new shapefile: https://drive.google.com/drive/folders/1D9v2DDO48mCbX22ga7hrz0ot4GccAx0D?usp=sharing

  • 1
    Well, I was not asking for that much. Thanks a lot for the specific details I appreciate it. I joined the field with a simple join in QGIS because I don't have the R thing, I was looking a few time ago how to install R thing to use it with QGIS I think I will give another shot. Thumbs up !
    – Eliasse
    Aug 22, 2019 at 18:38
  • Just one thing, FME warns me that the DBF and the SHP do not match as it seems that the DBF contains fewer records than the SHP. Also there is a problem in the files you shared in Google Drive, when I look in the attribute table I see that AMERICAN SAMOA as EUROS as CURRENCY ? It seems to me that there is some things to fix. But in the general way thanks for having detailed the procedure, and for the R code.
    – Eliasse
    Aug 22, 2019 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.