Giter Club home page Giter Club logo

labor-statistics-microservice's Introduction

Microservice Project - H1B Labor Statistics FY2019 API

Technologies Used

  • docker
  • docker-compose
  • flask
  • gunicorn
  • Elasticsearch
  • nginx

Dependencies

  1. docker
  2. docker-compose

Setup

  1. Install docker & docker-compose on Ubuntu machine
    • chmod +x ./setup_env.sh
    • ./setup_env.sh
  2. docker-compose up
    • import script may take awhile depending on the amount of CPU/RAM available

Usage

  1. Endpoints

    • /
    • /salary
  2. Inputs (must use query parameters):

    • Title query text (e.g. "software engineer" or "java")
    • Location query text (e.g. "new york city", "Portland, Maine")
    Example cURLs:
    curl --request GET \ --url 'http://localhost:5000/salary?location=NY&job_title=software'
    
  3. Outputs:

    • Number of results

    • Mean salary

    • Median salary

    • 25% percentile salary

    • 75% percentile salary

      Example output:
    {
      "num_results": 5,
      "statistics": {
        "mean_salary": {
          "value": 128899.6
        },
        "median_salary": {
          "values": {
            "50.0": 125000.0
          }
        },
        "salary_percentiles": {
          "values": {
            "25.0": 103377.0,
            "75.0": 142447.5
          }
        }
      }
    }
    

Additional Notes

  1. If deployed on a VM, the security group must allow incoming TCP requests on port 80.
  2. Only tested on an Ubuntu machine - unfortunately cannot guarantee smooth deployment on all other operating systems

labor-statistics-microservice's People

Contributors

theognis1002 avatar dependabot[bot] 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.