This repository contains all scripts (mostly Python) and data used in Mathematical Contests in Modelling I've participated in.
- MCM 2014
This archive folder is for Problem C in MCM 2014: Using Networks to Measure Influence and Impact. Several scripts were used for fetching and processing data from Google Scholar and IMDb. Complete report for this problem can be found in MCM 2014/Report.pdf
.
-
BuildCitationNetwork.py
: Crawl Google Scholar recursively by using a unofficial Python libraryscholar.py
for Google services credited to Christian Kreibich and try to bypass the security measures taken prohibiting bot access. A gexf-formatted network file will be generated by this script. -
ConstructGraph.py
: Convert raw data file to gml-formatted and dot-formatted network file. -
ExtractImdb.py
: Extract data from a list of cooperating relationship between IMDb actors and put matched information to a redis database. -
FetchCitationCount.py
: This script extendsBuildCitationNetwork.py
and adds citation count to the network graph generated. -
GraphAnalysis.py
: Based on previously gathered data, the script runs several algorithms to find out the properties of graph, including betweenness centrality, degree centrality, PageRank(TM) and eigenvector centrality.
- MCM 2015
This archive folder is for Problem A in MCM 2015: Eradicating Ebola. For medicine distributing part of the problem, scripts were used for processing and visualizing data from World Health Organization and Google Distance Matrix. Complete report for this problem can be found in MCM 2015/Report.pdf
.
-
process.py
contains necessary functionalities for solving the problem. For example,-
get_city_list()
extracts a list of infected cities from csv data provided by World Health Organization. -
go()
requests and processes data from Google Distance Matrix. -
read_modularity()
,extract_community()
andfind_center()
partition graph and locating center nodes according its modularity generated by Gephi. -
get_locality()
andcalc_localities()
compute case localities for ebola-infected cities, which is metioned in the report. -
create_graph()
anddraw_graph()
create and plot graph generated by scripts.
-
-
process_healthmap.py
processes offline datadata_healthmap.html
from another source besides WHO (Feb 8, 2015): healthmap.org and plots case vs. death figure. -
map.html
uses Google Map api to visualize central districts for 5 communities. -
distances/
contains distance data between districts in Guinea, Sierra Leone and Liberia (fetched on Feb. 8, 2015). Distances from each district to other districts were stored in individual json-formatted file. -
gexf_by_week/
contains gexf-formatted network graph plotted using weekly data. -
healthmap/
contains data parsed from healthmap.org (Feb. 8, 2015).