/stereotype-map

Map of national stereotypes

Primary LanguageJavaScriptApache License 2.0Apache-2.0

A map of national stereotypes.

The data is taken from Google's search suggestions, for queries such as "why are the french so".

search suggestion example

The results are certainly not politically correct, and that's what makes it interesting and funny!

Install

$ npm install --no-optional
$ node hook.js 8080 # start the server!

API

You are free to use the API, but please do not abuse it.

GET stereotypemap.info/api/{country ISO 3166-1 alpha-2 code}.json

Example:

GET stereotypemap.info/api/DE.json

You will get a JSON-formatted array of stereotypes associated with the country you chose.

Database

If you install the (optional) npm package pg-promise, data will be saved to a PostgreSQL database.

You must first create the tables (in the postgreSQL shell):

=> \i db/create.pgsql

You will need the file db.json, which contains your database credentials:

{
	"host": "localhost",
	"port": 5432,
	"database": "stereotypemap",
	"user": "getkey",
	"password": "yourpassword"
}

Credits

The map svg file is from amCharts, distributed under the CC BY-NC 4.0.