Git Product home page Git Product logo

internet-yellow-pages's Introduction

Internet Yellow Pages

Public IYP prototype

Visit http://iyp.iijlab.net to try our online prototype. No password is required, just click the 'connect' button to get started. Don't know how to use IYP ? You'll find a guide after clicking the 'connect' button, see also examples here.

Deploying a local IYP instance

Prerequisites

Downloading the Database dump

Explore and Download Dumps

Visit the database dumps repository at:

https://exp1.iijlab.net/wip/iyp/dumps/

Specific Dump Format

Dumps are organized by year, month, and day in this format:

https://exp1.iijlab.net/wip/iyp/dumps/YYYY/MM/DD/iyp-YYYY-MM-DD.dump

Replace YYYY, MM, and DD in the URL with the desired date to access a specific database dump.

Download Instructions

  1. Create a Directory:

    Execute the following command to create a dumps directory in your current working directory:

    mkdir dumps
    
  2. Download the Database Dump:

    Use curl to download the database dump and save it in the dumps/neo4j.dump path:

    curl https://exp1.iijlab.net/wip/iyp/dumps/YYYY/MM/DD/iyp-YYYY-MM-DD.dump -o dumps/neo4j.dump
    

Remember to replace YYYY, MM, and DD in the download command with the specific date you require.

Setting up IYP

To uncompress the dump and start the database run the following command:

docker compose --profile local up

This creates a data directory containing the database. This initial setup needs be done only once. It won't work if this directory already contains a database.

Afterwards, you can simply start/stop IYP to use it. To update the database with a new dump see Updating an existing database.

Start/Stop IYP

To stop the database, run the following command:

docker stop iyp

To restart the database, run the following command:

docker start iyp

Querying the database

Open http://localhost:7474 in your favorite browser. To connect the interface to the database give the default login and password: neo4j and password respectively. Then enter your query in the top input field.

For example, this finds the IXPs and corresponding country codes where IIJ (AS2497) is:

MATCH (iij:AS {asn:2497})-[:MEMBER_OF]-(ix:IXP)--(cc:Country)
RETURN iij, ix, cc

Countries of IXPs where AS2497 is present

IYP gallery

See more query examples in IYP gallery

Save modified database

If you modify the database and want to make a new dump, use the following command. Run the following command for updating an existing database. Note: This command writes the dump to backups/neo4j.dump and overwrites this file if it exists.

docker compose run -it iyp_loader neo4j-admin database dump neo4j --to-path=/backups --verbose --overwrite-destination

Updating an existing database

To update the database with a new dump remove the existing data directory and reload a dump with the following commands:

docker stop iyp
sudo rm -rf data
docker start iyp_loader -i

Viewing Neo4j logs

To view the logs of the Neo4j container, use the following command:

docker compose logs -f iyp

Creating a new dump from scratch

Clone this repository.

git clone https://github.com/InternetHealthReport/internet-yellow-pages.git
cd internet-yellow-pages

Create python environment and install python libraries:

python3 -m venv .
source bin/activate
pip install -r requirements.txt

Configuration file, rename example file and add API keys:

cp config.json.example config.json
# Edit as needed

Create and populate a new database:

python3 create_db.py

This will take a couple of hours to download all datasets and push them to neo4j.

Changelog

See: https://github.com/InternetHealthReport/internet-yellow-pages/releases

External links

internet-yellow-pages's People

Contributors

romain-fontugne avatar m-appel avatar roopeshsn avatar mohamedawnallah avatar yh010 avatar mhmdahmedfathi avatar mavrick-1 avatar aniket762 avatar kiransatyaraj 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.