One day I felt real dumb because I wasn’t very knowledgable about geography. I had met a person who told me they were from Guyana and I thought to myself “uh oh, I’m a grown man and this is an entire country I’ve never even heard of. Have I not… looked at a map before?!”
It turns out I had looked at a map before, but I didn’t do a very good job of it. In my defense, maps are surprisingly complicated and full of tons of countries. Like, so many countries. Maps are basically entirely countries, with some water inbetween for good measure. How was I going to learn about and remember all of these things? If only there was a fully interactive map I could use to drill myself on all of the countries of the world…
The World Geography Quiz can quiz you on three separate topics: Countries, Capitals, and Flags. You can customize the options () in numerous ways which I have found helpful in my learning/quizzing journey:
- Clicking Mode requires you to click on a country in order for your entry to be registered, which is a bit harder and requires you to know a country’s location and not just the fact that it exists. Or you can opt not to use this mode (it’s off by default) and instead just type all of the country names one after another.
- Sequence Mode will shift your entry from the Country to the Capital textboxes as you get the entries correct, meaning you will need to know the country and its capital in order to go through the quiz quickly and efficiently; otherwise you can leave it off (this is also off by default) and just type in what you think of as you think of it.
- Separate Territories means that territories will be counted separately from the countries they belong to. Obviously this is harder and disabled by default.
The map will fill in as you correctly enter information, and when “Solve All” is clicked it will turn red according to how much information you were missing for a given country (e.g. a country that you didn’t enter any information for will be a dark red, while a country that you entered the country and flag for but not the capital will be a lighter pink).
I am sure there are countries in here that will anger a lot of people, whether it’s about Cyprus/Northern Cyprus, Israel/Palestine, Somalia/Somaliland, or something else. All I can say about that is that I am not making any political statement with this map: it’s just the best json file that I found.
I built this using the indispensible datamaps library which is built on top of d3.js. The library abstracts away most of d3 which was nice since I wasn’t 100% familiar with it at the time, but there were a couple of times I had to dig into the guts to customize a few things about the way maps were rendered and linked up with data. All in all, it was a surprisingly pleasant introduction to the library as well as the fascinating world of geography, maps, topojson/geojson, shapefiles, and more. The options are saved using cookies, and I also want to give a shout-out to lodash and handlebars for being so helpful.