m-GDEV/explore-wikipedia

Using hyperlinks and graphs to explore wikipedia

★ 0Forks 0JavaScriptGitHub ↗Compare

Project website ↗

README

GitHub commit activity Contributors Forks GitHub Repo stars Issues MIT License


Logo

Explore Wikipedia

Ever wanted to explore the links between wikipedia pages and maybe even find paths between pages?

Table of Contents

About The Project

Explore Wikipedia allows you to simply explore the links between pages on wikipedia and visualize the paths between them.

Demo Video

Why I Created This Project

I created this proejct shortly after learning taking a data structures course. We learned about graphs, trees, traversal, and DFS and BFS algorithms. After learning about this I immediately connected it to The Wiki Game: a game that places you at a certain page and asks you to find your way to the given target page. I created this project so that I could do just that and visualize the results as well. The python script build_graph.py can actually 'play' this game perfectly. Given a starting page and a target page, it will use a DFS to explore all wikipedia pages until it eventually finds the target page. It actually works pretty well for pages that are highly related but as soon as you put in pdifferent pages, it will get completely 'lost' and take forever to find the target (mostly because wikipedia has so many pages lol). The frontend simply looks at pre-generated data and allows you to visualize how individual pages connect to each other. This is one of my favourite projects because it is genuinely so cool to see the links between pages and the weird and unexpected links you can find between something like the page "B Programming Language" and "Gary Kasparov" (former world chess champion).

Features

  • Solve any problem from The Wiki Game
  • Find a path between any two pages on Wikipedia
  • Beautifully visualize the path between two pages

Technologies Used

Installation

  • Create a python virtual environment with python3 -m venv ./env
  • Activate the environment: source ./env/bin/activate
  • Run src/build_graph.py and input the names of the source and target wikipedia pages
  • You can now look at the generated graph here: build/converted.js. This file has the graph converted from nx format (what python ses) to cytoscape which is what the frontend JavaScript uses.
  • Run npm install to install all frontend packages
  • Run npm run dev to run the frontend
  • Go to http://localhost:5173 and view the cool visualization :)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project on Github
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request on Github

Top contributors:

contrib.rocks image

Contact

Musa Ahmed - [email protected]

Project Link: https://github.com/m-GDEV/explore-wikipedia

Acknowledgments

(back to top)

License

Distributed under the GPL 3.0 License. See LICENSE for more information.

Contributors

m-GDEV

Issues