Coder Social home page Coder Social logo

forest-change-analysis-elastic's Introduction

Terra I Analysis API Microservice Overview

Build Status Test Coverage

Query the Terra I forest loss dataset with the Global Forest Watch (GFW) API

NB: This repo used to handle GLAD analysis requests as well - this functionality has been moved here.

  • Analyze datasets by a custom area of interest using the GFW Geostore API or by sending GeoJson in Post
  • Analyze datasets by Country, State and Districts (defined by the GADM Database)
  • Analyze datasets by GFW Land Use features (Managed Forest Concessions, Oil Palm Concessions, Mining Concessions and Wood Fiber Concessions- available in select countries)
  • Analyze datasets by Protected Areas (defined by the WDPA database)
  • Get dataset download urls (csv and json) for areas of interest
  • Summarize analysis results by day, week, month, quarter or year
  • Get dataset date range/ latest date

Dependencies

Dependencies on other Microservices:

API Endpoints

For endpoint documentation, please visit our API documentation page for TerraI

Getting Started

Perform the following steps:

  • Install docker
  • Install control tower
  • Clone this repository: git clone https://github.com/gfw-api/forest-change-analysis-elastic.git
  • Enter the directory (cd forest-change-analysis-elastic)
  • Change the GATEWAY_URL and Port in the docker-compose-develop.yml and docker-compose.yml and Dockerfile to your machine and port #
  • Open a terminal (if you have mac or windows, open a terminal with the 'Docker Quickstart Terminal') and run the gladanalysis.sh shell script in development mode:
./gladanalysis.sh develop

If this is the first time you run it, it may take a few minutes.

Testing

Testing API endpoints

./gladanalysis.sh test

Config

register.json

This is the configuration file for the rest endpoints in the microservice. This json connects to the API Gateway. It contains variables such as:

  • #(service.id) => Id of the service set in the config file by environment
  • #(service.name) => Name of the service set in the config file by environment
  • #(service.uri) => Base uri of the service set in the config file by environment

Example:

{
    "id": "#(service.id)",
    "name": "#(service.name)",
    "tags": ["gfw"],
    "urls": [{
        "url": "/v1/terrai-alerts/admin/:iso_code",
        "method": "GET",
        "endpoints": [{
            "method": "GET",
            "path": "/api/v2/ms/terrai-alerts/admin/:iso_code"
        }]
    }, {
        "url": "/v1/terrai-alerts/admin/:iso_code/:admin_id",
        "method": "GET",
        "endpoints": [{
            "method": "GET",
            "path": "/api/v2/ms/terrai-alerts/admin/:iso_code/:admin_id"
        }]
    }, {
        "url": "/v1/terrai-alerts/admin/:iso_code/:admin_id/:dist_id",
        "method": "GET",
        "endpoints": [{
            "method": "GET",
            "path": "/api/v2/ms/terrai-alerts/admin/:iso_code/:admin_id/:dist_id"
        }]
    }]
}

'''

forest-change-analysis-elastic's People

Contributors

01painadam avatar archelogos avatar astrong19 avatar mappingvermont avatar rrequero avatar simaob avatar solomon-negusse avatar tiagojsag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

forest-change-analysis-elastic's Issues

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.