GithubHelp home page GithubHelp logo

wiki's Introduction

Wiki API Scrape

To Use

  • git clone [email protected]:whagan/wiki.git
  • cd wiki
  • virtualenv venv && source venv/bin/activate (optional python virtual environment)
  • pip install -r requirements.txt
  • python graph.py

What is It?

This program uses Wikipedia's API to collect See also links for individual Wikipedia pages. These pages and links represent a directed graph. For instance, a user may reach Predictive Analytics from Data visualization using only Wikipedia's See also links:

Data visualization -> Data analysis -> Predictive analysis

The program is a long-running script. If an endpoint is specified, the program terminates when it is found. Otherwise the program may continue searching without end. The program creates and records to graph.log as it executes:

graph.log

The graph it produces is stored in wiki_nodes_links.json and looks like this:

A pickle file is also created. sql_graph.py unpickles graph.pickle and converts the data into graph.json, which is a json of nodes and links:

sql_graph.py also has an upload() function, which is a work in progress. When it is complete, it will load the graph into a sqlite database (sqlite required).

Let's get biblical: Does a path exist between Book of Genesis and Book of Revelation?

wiki's People

Contributors

whagan avatar

Watchers

 avatar

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.