Global Forest Watch

An online, global and near real-time forest monitoring tool.
https://github.com/wri/gfw

Category: Biosphere
Sub Category: Forest Observation and Management

Keywords

deforestation forest-monitoring mapbox nextjs react redux satellite-imagery

Keywords from Contributors

climate-change conservation sustainability climate bigdata gfw resilience wri-api biodiversity measur

Last synced: about 1 hour ago
JSON representation

Repository metadata

Global Forest Watch: An online, global, near-real time forest monitoring tool

README.md

What is Global Forest Watch?

Global Forest Watch (GFW) is a
dynamic online forest monitoring and alert system that empowers people
everywhere to better manage forests. This repository contains the GFW web app.

Global forest watch map

Getting started

The GFW web app is built with Nextjs, React and Redux.

Installing the app

Clone the repo:

$ git clone https://github.com/wri/gfw.git

Installing dependencies:

$ yarn

Copy the .env.sample to .env.local, and start the server:

$ yarn dev

The app should now be accessible on http://0.0.0.0:3000.

Developing

We follow a Gitflow Worklow for development and deployment.
We merge pull requests into develop, which is deployed automatically to both the staging and pre-production servers. In order to release features into production, we merge develop into master, triggering an automatic deployment to production.

gitflow workflow

Staging, pre-production and review apps

We use Heroku to deploy our apps. Production is deployed automatically from master to globalforestwatch.org.

We have two staging environments: staging and pre-production. Both are deployed automatically from develop.
The main difference is that staging points to the staging environments of the APIs we access, pre-production points to the production ones. This is set by the NEXT_PUBLIC_FEATURE_ENV env variable.

We also make use of Heroku's Review Apps feature.
When a pull request is created, a review app is deployed automatically by Heroku with a NEXT_PUBLIC_FEATURE_ENV of preproduction, and a link to the environment is added automatically to the respective pull request.

Releases

We are using github releases to record changes to the app. To help us manage this we are using Zeit Releases, an npm package for handling github releases, tagging commits (major, minor, patch), and automating semantic release logs. For a more detailed explanation of semantic changelogs see this post.

Managing commits for a release

When developing, you can tag your commits as follows: fix some excellent bug (patch) where patch can be (major/minor/patch/ignore). This commit title will automatically be grouped into the correct section for the release. Otherwise you will be prompted during the release to assign (or ignore) each of your commits. You will have to do this for every commit so don't forget to squash!

So how do you make a release on GFW?

  1. Checkout master and merge in develop (not compulsory but advised for consistency).
  2. Run npx release [type] where type can be major, minor, patch, or pre (see zeit docs for more details).
  3. Follow the prompts to manage commits.
  4. You will be taken to github draft release editor with all your commits grouped and ready to go.
  5. Enter your title and include any extra info you want.
  6. Publish!

RW API Documentation for GFW

Map layers and relevant datasets are stored in the RW-API and the globalforestwatch.org/map utilises the layer-manager to render them.

The schema used to style these layers, their legends, and define their interactions are specific to the Global Forest Watch platform.

When creating or modifying layers/datasets for GFW, follow the schema and syntax outlined in the API Documentation markdown file.

To view GFW-specific layers and datasets use the following endpoint:

https://api.resourcewatch.org/v1/dataset?app=gfw&includes=layer,vocabulary,metadata&page[size]=200

BrowserStack

We use BrowserStack to find and fix cross-browser issues.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 8 days ago

Total Commits: 20,135
Total Committers: 97
Avg Commits per committer: 207.577
Development Distribution Score (DDS): 0.79

Commits in past year: 313
Committers in past year: 9
Avg Commits per committer in past year: 34.778
Development Distribution Score (DDS) in past year: 0.348

Name Email Commits
Ed Brett e****t@g****m 4219
Miguel Barrenechea m****a@s****s 2681
Adrián Pérez a****n@s****s 2152
pjosh j****r@g****m 1324
Adam J. Pain a****9@g****m 1019
Javier Arce j****e@g****m 810
Carlos Matallín m****o@v****m 663
Daniel Fernández Rico d****o@g****m 620
Willian Viana w****a@g****m 529
Adam Mulligan a****n@g****m 483
Tomas Eriksson t****e@g****m 433
Simao Rodrigues a****o@g****m 398
Gerardo g****o@v****m 385
Alicia Arenzana Gil de muro a****a@g****m 360
Pedro Garcia p****o@s****s 307
Pedro Pimenta p****o@p****o 260
Alyssa Westerman a****n@w****g 240
Hector hi@h****s 237
beej23 b****s@w****g 224
Benjamin A. Laken b****n@g****m 215
Simao Belchior s****r@g****m 179
Adrián a****a@a****o 173
KarlaRenschler k****r@w****g 158
j8seangel j****l@g****m 156
Luis Zenteno l****5@w****g 136
David Gonzalez d****d@s****s 124
Fernando Espinosa f****r@f****m 122
Alicia a****a@M****l 106
Aaron e****e@g****m 94
dcano d****o@v****m 89
and 67 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 7
Total pull requests: 572
Average time to close issues: about 2 years
Average time to close pull requests: about 1 month
Total issue authors: 3
Total pull request authors: 19
Average comments per issue: 0.29
Average comments per pull request: 0.16
Merged pull request: 451
Bot issues: 0
Bot pull requests: 42

Past year issues: 1
Past year pull requests: 229
Past year average time to close issues: N/A
Past year average time to close pull requests: 9 days
Past year issue authors: 1
Past year pull request authors: 11
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.1
Past year merged pull request: 187
Past year bot issues: 0
Past year bot pull requests: 15

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/wri/gfw

Top Issue Authors

  • u2005398 (5)
  • jcunhafonte (1)
  • gireeshkbogu (1)

Top Pull Request Authors

  • wri7tno (208)
  • willian-viana (190)
  • SARodrigues (85)
  • dependabot[bot] (42)
  • AngelArcones (18)
  • pedrogpimenta (11)
  • clementprdhomme (3)
  • edbrett (2)
  • colinjstief (2)
  • teresa-n-schofield (2)
  • omahs (1)
  • elpamart (1)
  • maximevtush (1)
  • tomasmoose (1)
  • solomon-negusse (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (42)
  • javascript (19)
  • old (4)
  • epic (3)
  • WIP (2)
  • blocked (1)

Dependencies

package.json npm
  • @cypress/code-coverage ^3.8.1 development
  • autoprefixer ^9.7.5 development
  • babel-eslint ^10.1.0 development
  • babel-plugin-istanbul ^6.0.0 development
  • cypress ^7.6.0 development
  • cypress-audit ^0.2.3 development
  • cypress-lighthouse ^0.1.0 development
  • eslint ^6.8.0 development
  • eslint-config-airbnb ^18.1.0 development
  • eslint-config-prettier ^6.10.0 development
  • eslint-plugin-cypress ^2.10.3 development
  • eslint-plugin-import ^2.20.1 development
  • eslint-plugin-jsx-a11y ^6.2.3 development
  • eslint-plugin-prettier ^3.1.2 development
  • eslint-plugin-react ^7.19.0 development
  • eslint-plugin-react-hooks ^2.5.1 development
  • eslint-plugin-security ^1.4.0 development
  • husky ^4.2.3 development
  • istanbul-lib-coverage ^3.0.0 development
  • lint-staged ^10.0.8 development
  • nyc ^15.0.0 development
  • postcss-preset-env ^6.7.0 development
  • prettier ^2.0.2 development
  • start-server-and-test ^1.10.11 development
  • stylelint ^13.3.0 development
  • stylelint-config-standard ^20.0.0 development
  • stylelint-scss ^3.16.0 development
  • @artsy/fresnel ^1.1.0
  • @fullpage/react-fullpage ^0.1.18
  • @mapbox/mapbox-gl-draw ^1.1.2
  • @next/bundle-analyzer ^10.0.1
  • @reduxjs/toolkit ^1.4.0
  • @wordpress/api-fetch ^3.19.1
  • @zeit/next-sass ^1.0.1
  • aws-sdk ^2.291.0
  • axios ^0.21.1
  • chroma-js ^2.1.0
  • classnames ^2.2.6
  • cookie ^0.4.1
  • d3-ease ^1.0.5
  • d3-format 1.2.1
  • d3-scale ^3.2.1
  • date-fns ^2.12.0
  • deck.gl 7.3.6
  • downshift ^5.0.5
  • express ^4.17.1
  • fast-redux ^0.7.1
  • file-saver ^2.0.2
  • final-form ^4.18.7
  • gfw-components 1.7.11
  • heroku-ssl-redirect ^0.1.1
  • image-trace-loader ^1.0.2
  • imagemin-mozjpeg ^8.0.0
  • imagemin-optipng ^7.1.0
  • imagemin-svgo ^7.1.0
  • jszip ^3.2.2
  • jszip-utils ^0.1.0
  • layer-manager ^3.0.8
  • lodash ^4.17.21
  • lottie-web ^5.7.3
  • luma.gl 7.3.2
  • mapbox-gl ^1.11.1
  • moment 2.24.0
  • next ^10.0.1
  • next-compose-plugins ^2.2.0
  • next-optimized-images ^2.6.2
  • next-sitemap ^1.2.22
  • node-sass ^4.13.1
  • postcss-flexbugs-fixes ^4.2.0
  • proj4 ^2.5.0
  • promise.prototype.finally ^3.1.2
  • prop-types ^15.7.2
  • query-string ^6.11.1
  • react ^17.0.1
  • react-content-loader ^5.0.2
  • react-datepicker ^3.3.0
  • react-dom ^17.0.1
  • react-dotdotdot ^1.3.1
  • react-dropzone ^4.2.13
  • react-facebook-pixel ^1.0.3
  • react-final-form ^6.3.5
  • react-ga ^2.7.0
  • react-html-parser 2.0.2
  • react-intersection-observer ^8.31.1
  • react-joyride ^2.2.1
  • react-map-gl ^5.2.7
  • react-modal ^3.11.2
  • react-outside-click-handler ^1.3.0
  • react-portal ^4.2.1
  • react-pose ^3.3.6
  • react-redux ^7.2.2
  • react-scroll ^1.7.16
  • react-simple-maps ^2.0.0
  • react-slick ^0.25.2
  • react-spring 8.0.27
  • react-stickynode 1.4.1
  • react-tagsinput ^3.19.0
  • react-tippy ^1.4.0
  • react-toggle ^4.1.1
  • react-twitter-conversion-tracker ^1.0.0
  • react-youtube ^7.9.0
  • recharts ^1.7.1
  • redux ^4.0.5
  • redux-actions ^2.6.5
  • release ^6.3.0
  • reselect 4.0.0
  • responsive-loader ^1.2.0
  • simple-entity-decode ^0.0.3
  • svg-sprite-loader 4.1.3
  • three ^0.125.0
  • three-orbit-controls ^82.1.0
  • turf-area ^3.0.12
  • turf-bbox ^3.0.12
  • turf-bbox-polygon ^3.0.12
  • turf-combine ^3.0.12
  • turf-inside ^3.0.12
  • turf-linestring ^1.0.2
  • turf-point ^2.0.1
  • turf-polygon ^1.0.3
  • use-deep-compare-effect ^1.3.1
  • viewport-mercator-project 6.1.1
  • vizzuality-components ^3.0.3
  • webp-loader ^0.6.0
  • webpack-filter-warnings-plugin ^1.2.1
  • wri-json-api-serializer ^1.0.1
yarn.lock npm
  • 2499 dependencies
.github/workflows/ci.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/checkout v1 composite
  • actions/setup-node v1 composite
  • cypress-io/github-action v2 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite

Score: 10.324103964411636