Giter Club home page Giter Club logo

scientific-mobility's Introduction

Tracing scientific mobility with folium map (restored)

Following script creates a geographic map of scientific mobility. It shows scientists going from host institute to guest institute for a given year.

Preprocessing

IMPORTANT: The information about the various institutes of the scientists should be available. You should know geolocations (latitude and longitude) of the host and guest institutes. If not, use 'geopy-googlemaps-batchgeocoder' from github to generate geoinfo (latitude and longitude) (You need to purchase necessary Google API key). As described in the 'geopy-googlemaps-batchgeocoder' folder, you will need to create a csv input file with the names of the host and guest institutes, adressline and city. You will have to run batchcoder's python code twice, i.e. once for host institutes and once for guest institutes. When processing csv output file, first open the excel program and then import the data in the excel file with the import button. Convert the geodata to text before clicking the finish button. This is to get geodata in a proper format.

Further processing

The data from csv output files of host and guest institute are bundled with information such as applicant, title, year, name of institution. An example excel file is provided with this repository, to match with the column names used in the script below. Alternatively you can change column names in the scripts to match with your excel. The output of the python code is a map in an html format.

Script

Importing various modules required for analysis

pandas

folium

os

tkinter

Importing the scientific mobility example 'folium import file' with Tkinter module. You need to close the window after importing the file provided in the github repository.

Converting the datatypes to allow it to proces in folium

Creation of folium map

import folium.plugins for Markercluster

generating a map

adding layers to map, default 'off' for cluster host universities

adding marker clusters to respective layers

adding markers to marker cluster for each source university

adding markers to marker cluster for each destination university

adding lines going from host institute to guest institutes

adding title to the map

saving the map in the folder where your current jupyter notebook is.

User manual html file

You can view the number of scientists per region and per zoom level. The markers are colored based on quantity: more than 10 is color red yellow, 2 to 10 is color green. If you hover over the color red yellow markers, you can see the range. There are two layers of information: Host and guest institute info with the guest institute info default on. Zooming in further shows the numbers of scientists per region. Zooming in even further gives number of scientists per university. The last zoom lists each scientist by address with number 1 in the circle. If you hover over a circle, you get information about the scientist. You can see the specific research information when you click on it. The guest addresses are in red color and the host addresses are in blue color.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.