Git Product home page Git Product logo

aviation-json's Introduction

Codeship Status for cristobal-io/aviation-json Coverage Status

aviation-json

Description:

Module created to make available a quick way to update all the aviation related information from wikipedia.

Using the package aviation-scraper to download all the information regarding airports, airlines and their destinations from wikipedia exposes the following files:

  • airline_destinations.json (an object where the key is the airline url and an array of destination airport urls)
  • airlines.json (an array with all the airlines data)
  • airport_airlines.json (an object with all the airports including the airlines that fly to this airport grouped into an array)
  • airport_cities.json (an object where the key is the primary key of the airport that includes the name and the url of the city it belongs to.)
  • airport_runways.json (an object with the runways for each airport.)
  • airports.json (an object with all the airports and their data)
  • city_airports.json (an object that includes all the airports into one city.)

Usage.

install via npm:

npm install aviation-json --save
var aviationJson = require("aviation-json");
// then you will have available all the information.

var airlineDestinations = aviationJson.airline_destinations;
var airlines = aviationJson.airlines;
var airportAirlines = aviationJson.airport_airlines;
var airportsCities = aviationJson.airport_cities;
var airportRunways = aviationJson.airport_runways;
var airports = aviationJson.airports;
var cityAirports = aviationJson.city_airports;

Updating the information:

Go to the node_modules/aviation-json directory and run 'make sync'

This is going to take a while and depending on your internet connection you may have troubles, after the 5 time trying to reach the wikipedia page to scrape the information, it will throw and err.

Testing.

All the code is properly tested. To run the test:

# this command lint all the files and runs the tests.
make test

if you want to be in watch mode:

# this command run the test in watch mode.
make dev

Contributions:

If you want to contribute, create your branch and place a PR or open an issue.

aviation-json's People

Contributors

cristobal-io 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.