Coder Social home page Coder Social logo

academic-ancestors's Introduction

Academic ancestors from Wikidata

A few Python scripts that construct academic ancestor graphs (i.e. chains of Ph.D. students and their Ph.D. advisors). This is done by sending SPARQL queries to Wikidata that follow the doctoral advisor (P184) relations. See this blog post for an explanation and examples.

Required Python packages: requests, graphviz

There are currently two scripts:

ancestors2dot

Grab the complete ancestor tree of a specific researcher, and output it in graphviz DOT format.

Usage:

./ancestors2dot.py Qxxxxx [outfile.dot]

Qxxxxx: a researcher's Wikidata ID
outfile.dot: file to write to if supplied; otherwise write to stdout

You will need to have graphviz installed to actually graph the resulting DOT file, by doing something like:

dot -Tpng personA.dot > personA.png

common2dot

Given two researchers, graph the path to their most recent common ancestor, if any.

Usage:

./common2dot.py Q1xxxx Q2xxxx [outfile.dot]

Qxxxxx: two researchers' Wikidata IDs
outfile.dot: file to write to if supplied; otherwise write to stdout

Note that if the two researchers both have large ancestor trees, the query may time out. There is probably a way to optimize it so that doesn't happen (suggestions welcome).

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.