GithubHelp home page GithubHelp logo

grace-amondi / ordinary_kriging Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 26.28 MB

Geostatistical Prediction with ordinary kriging

Home Page: https://ordinary-kriging.surge.sh/

License: MIT License

JavaScript 67.90% HTML 25.57% CSS 6.53%
geostatistics kriging mapbox-gl-js filereader turfjs filereader-api parcel materialize-css

ordinary_kriging's Introduction

Ordinary Kriging

Introduction

demo

Geostatistical Prediction with ordinary kriging Ordinary Kriging is a spatial estimation method where the error variance is minimized. This error variance is called the kriging variance. It is based on the configuration of the data and on the variogram. For example, say we are studying copper concentration in soil, your training data is point data with attribute information..say copper concentration at each point.The test data contains just point data...without copper concentration.The train data is used to create a variogram which predicts the copper concentration for the test data. Try Demo or view demo on youtube.

According to sakitam-gis,the various variogram models can be interpreted as kernel functions for 2-dimensional coordinates a, b and parameters nugget, range, sill and A. Reparameterized as a linear function, with w = [nugget, (sill-nugget)/range], this becomes:

  • Gaussian: k(a,b) = w[0] + w[1] * ( 1 - exp{ -( ||a-b|| / range )2 / A } )
  • Exponential: k(a,b) = w[0] + w[1] * ( 1 - exp{ -( ||a-b|| / range ) / A } )
  • Spherical: k(a,b) = w[0] + w[1] * ( 1.5 * ( ||a-b|| / range ) - 0.5 * ( ||a-b|| / range )3 )

The variance parameter α of the prior distribution for w should be manually set, according to:

  • w ~ N(w|0, αI)

Using the fitted kernel function hyperparameters and setting K as the Gram matrix, the prior and likelihood for the gaussian process become:

  • y ~ N(y|0, K)
  • t|y ~ N(t|y, σ2I)

Run application

Clone application

git clone https://github.com/Grace-Amondi/ordinary_kriging.git

Move into the ordinary_kriging directory

cd ordinary_kriging

Change .env.example to .env and Set your mapbox access token.Install node modules

npm install

Run application

npm start

Open application at http://localhost:1234


Build for production

To build the app for production,

npm run build

Navigate to /dist folder and deploy to surge or github pages


Resources Used

Mapbox GL

Mapbox GL JS is a JavaScript library used to render interactive maps. This application uses Mapbox GL to create a map object, display geojson data, create layers from the datasets and create layer groups from the layers.

Turf JS

Turf JS provides a set of submodules for advanced geospatial analysis on the browser. This application uses turf js to create point features, append attribute data to point data and create feature collections from the point data

Mapbox GL plugins

mapbox-gl-controls

mapbox-gl-controls provides an array of controls that can be added to the map to enhance interactivity. This application uses mapbox-gl-controls's RulerControl,CompassControl,ZoomControl and AroundControl submodules.

Javascript FileReader

Javascript FileReader enables asynchronous reading of contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read.This was used in reading of training and test geojson data.

FileSaver

FileSaver enables saving files on the client-side which is exactly what it was used for in this application. With the saveAs() function you are good to go.

Parcel

Parcel is a web application bundler. It has been used to bundle this application into a minified version.Parcel also converts JS assets to ES5.

Materialize

Materialize has been used to design the app's beautiful user interface with mobile responsiveness, grids and cards.

Geojson-Generator

Geojson-Generator is a tool that enables generation of random geojson point data within a specified bounding box. This application used it to generate random numeric point data for testing.

ordinary_kriging's People

Contributors

grace-amondi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

ordinary_kriging'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.