Coder Social home page Coder Social logo

ciatph / terrai-gbif Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 307 KB

A Terra-i and GBIF project by CIAT for the 2018 Ebbe Nielsen Challenge.

Home Page: https://ciatph.github.io/#/terrai-gbif

HTML 5.02% CSS 8.06% JavaScript 81.13% Scheme 0.88% R 4.45% Batchfile 0.46%
html5 css3 javascript leafletjs geoserver geotiff ciat

terrai-gbif's Introduction

terrai-gbif

A data visualization tool developed for the 2018 Ebbe Nielsen Challenge that overlays modeled GBIF species loss data over Terra-i's deforestation information for closer look-up and information.

Figshare link

Introduction

Here we present a methodology and a prototype tool powered by machine learning algorithms that allows for near real time threat (and loss) monitoring of vulnerable plant species, using open data (ground-truthed and remotely sensed). Improvements in machine learning algorithms and access to high quality remotely sensed data (top down) has enabled “remote” monitoring of the earth’s status. The applicability of insights obtained can be further improved by incorporating ground truthed (bottom up) data. The proposed tool leverages upon the ease at which one can access GBIF’s high quality spatialized data in a standardized format at scale, further augments this with remote sensing data and machine learning algorithms in order to monitor threat status of plant species. This tool mashes multiple datasets, merges geospatial layers, to generate new insights, and provides a new use case of open data, further supporting the call for FAIR (Findable, Accessible, Interoperable and Reusable) data. Biodiversity monitoring is central to Sustainable Development Agenda, we propose to use this case-study as an example to promote spatialization and FAIR access of national biodiversity records currently held by various government agencies.

- [email protected] & CIAT team

Website Installation/Usage

The geoTiff files have been previously modeled and generated by algorithms mentioned in the Introduction. Please refer to gbif_v3.R for more details.

Prerequisites

  1. Generate raster (GeoTiff) files of species and deforestation generated from the modeling process and Terra-i.
  2. NodeJS installed in your machine.
  3. A stable internet connection for fetching the hosted rasters online.

Optional Prerequisites

Do the following steps if you will want to run the GeoServer map server and WMS itself in your local PC or an external online server. GeoServer has various installation methods for different OS platforms in this link instructions.

(GeoServer + Apache Tomcat 8.5)

For this project, we installed GeoServer with Apache Tomcat. More of its installation methods can be read from here.

  1. Install GeoServer locally in your machine or in your online server.

  2. Create a workspace in GeoServer named terrai-gbif.

    • Type the following for the Namespace URI:
      • for GeoServer hosted online Microsoft Azure
        <PROJECT_NAME>.azurewebsites.net/geoserver/terrai-gbif
      • for GeoServer hosted in localhost
        http://localhost:8080/geoserver/terrai-gbif
    • Check the Set as Default Workspace checkbox
  3. Upload GeoServer styles for rasters from sld-styles, using their filenames as names for the styles themselves. Use the terrai-gbif for workspace.

    • terrai-base.sld
    • terrai-species.sld
    • terra-add.sld
  4. Upload the Geotiff files as GeoTIFF Data Store. For more information, see Creating Geotiff Data Stores.

    • for GeoServer hosted online Microsoft Azure

      • Upload the GeoTiff files via FTP to
        /site/wwwroot/bin/apache-tomcat-8.5.24/webapps/geoserver/data/data/raster/
    • for GeoServer hosted in localhost: Put the GeoTiff files anywhere in your hard drive.

    • NOTE: Rename the geotiff files such that they have no spaces in between before setting as data source. Make sure they are named as follows to be referenced in the same naming convention used as in the website codes (or you can edit them in the website codes from main.js: initializeMaps()):

        (ASIA)
        asia_Terra-I_resampled_fromedit.tif
        picea_add.tif
        picea_asperata.tif
        taiwania_cryptomerioides.tif
        taiwania_add.tif
      
        (LATIN AMERICA)
        latin_terra_I_resamp_fromedit.tif
        p_andina_add.tif
        p_salignus_add.tif
        p_uviferum_add.tif
        pilgerodendron_uviferum.tif 	
        podocarpus_salignus.tif 
        prumnopitys_andina.tif => p_andina.tif
      
  5. Apply the uploaded .sld styles to the GeoTiffs. This can be accessed by setting the Default Style in the Publishing tab. Detailed instructions can be read in the publishing tutorial tutorial. Set the following sld styles to their corresponding GeoTiffs:

    • terrai-base.sld = asia_Terra-I_resampled_fromedit, latin_terra_I_resamp_fromedit
    • terra-add = all rasters ending in *__add_
    • terrai-species = the rest of the rasters
  6. Change the following lines from js/map.jsto enable reading rasters from the local GeoServer. Change ONLINE: true to ONLINE: false:

     const SETTINGS = {
         // flag to use the online or local maps GeoServer
         ONLINE: true  // CHANGE true TO false
     };
    

Accessing the Rasters from the Online GeoServer WMS

The raster layers can be accessed from the GeoServer instance hosted on http://terraigbif-server.azurewebsites.net/ for this project.

The WMS and list of available rasters can be accessed by web mapping frameworks such as leafletJS through the a GetCapabilities request from GeoServer:

http://terrai-gbif.azurewebsites.net/geoserver/wcs?SERVICE=WCS&REQUEST=GetCapabilities&VERSION=2.0.1

Local Website Installation (Running this website from your PC)

  1. Clone or download this repository into your desktop.
  2. Navigate inside the cloned directory using the command line, then run npm install
  3. Using the command line, run http-server
  4. Copy any of the links that will be generated and paste it in your browser.

Embedding the Matomo Website analytics Widget

The website uses a self-hosted matomo instance running on a free tier 000webhost account for tracking web page visitor counts and other website analytics. Matomo is an open-source analytics platform that have options for paid versions. Data analytics can be accessed by embedding the following iframe into a website's body:

<div id="widgetIframe"><iframe width="100%" height="750" src="https://ciatph.000webhostapp.com/analytics/index.php?module=Widgetize&action=iframe&containerId=VisitOverviewWithGraph&widget=1&moduleToWidgetize=CoreHome&actionToWidgetize=renderWidgetContainer&idSite=2&period=day&date=2018-09-10&disableLink=1&widget=1&updated=1" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></div>

The self-hosted instance can be accessed by approved at https://ciatph.000webhostapp.com/analytics. An in-depth tutorial, installation and usage guide for Matomo can be read from here.


Date Created: 20180905
Date Modified: 20180910

terrai-gbif's People

Contributors

ciatph avatar

Stargazers

 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.