Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Interactive map of the origin-destination stocks by country
JavaScript Python
tree: 544fe7216d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.idea
generated
jquery-ui-1.8.16.custom
univers-else-font
CNAME
GDP.json
HIV.json
LICENSE
POP.json
README.md
TUBERCULOSIS.json
UNDER-FIVE-MORTALITY.json
arrowcomputer2.py
associate_map_to_db.py
cache.manifest
code_to_coordinates.json
code_to_name.json
countrieslatlong.json
facebook-image.png
favicon.ico
geojsontosvg.py
geoloc.json
global_migrant_origin_database_version_4.csv
gray_texture.jpg
hasher.js
index.html
jquery.js
jsoncsvunifier.py
main.css
modernizr.geoloc.js
name_to_code.json
parser.py
raphael.js
reconciliation.json
right_blue_arrow.png
server.py
signals.js
source.txt
target.png
world-bank-urls.txt
worldBankDataGetter.py
world_svg_paths.json
world_svg_paths_by_code.json

README.md

MigrationsMap.net

This is the code of the site http://migrationsmap.net, including the scripts used to generate the JSON data files.

  • parser.py generates two Python matrices (in fact, dictionnaries of dictionnaries) from the file global_migrant_origin_database_version_4.csv: matrix[country_code1][country_code2] which allows to find the number of migrants leaving from country 1 to country 2 (countries are represented by their ISO 3166 three letters country code). reversed_matrix allows to find the number of migrants arriving, instead of leaving. In the processes of creating those matrices, two useful files are generated:
    • code_to_name.json a JSON object allowing to match iso country codes to country names
    • name_to_code.json allows the reverse translation from country names to country code parser.py also contains the function geolocalize_the_world which obtains geographic coordinates for every country of code_to_name.json from the Google geolocation api and stores it in geoloc.json (beware, because of some mistakes, this file has been manually edited after the process, for example because Georgia had been located in the U.S.A.).

The code is under MIT license.

Something went wrong with that request. Please try again.