Giter VIP home page Giter VIP logo

tsc_drivers's Introduction

TSC Drivers

Adapted from the category_alpha branch of hansen_ee_preprocessing.

  • The lossyears_classification asset was created with this.
  • The hansen_binary_loss asset was created with this.

Tiles

Due to the earthengine limits discussed here tile processing happens in 2 (and a half) steps:

  1. Export Tiles for zoom-levels 12-7, and export an earthengine asset for zoom-level 7
  2. Export Tiles for zoom-levels 6-2

The code can be run via the command line:

# step 1
$ python tsc_drivers.py inside

# step 2 (after the earthengine asset for zoom-level 7 has completed processing)
$ python tsc_drivers.py outside

There are various options like using test geometries, versioning, changing the zoom-level used as a break between step 1 and 2, and more.

python|master $ python tsc_drivers.py -h
usage: tsc_drivers.py [-h] [-g GEOM_NAME] [-v VERSION]
                       threshold {inside,outside,zasset} ...

HANSEN COMPOSITE

positional arguments:
  threshold             treecover 2000: one of [10, 15, 20, 25, 30, 50, 75]
  {inside,outside,zasset}
    inside              export the zoomed in z-levels
    outside             export the zoomed out z-levels
    zasset              export z-level to asset

optional arguments:
  -h, --help            show this help message and exit
  -g GEOM_NAME, --geom_name GEOM_NAME
                        geometry name (https://fusiontables.google.com/DataSou
                        rce?docid=13BvM9v1Rzr90Ykf1bzPgbYvbb8kGSvwyqyDwO8NI)
  -v VERSION, --version VERSION
                        version

NOTES

# copy from s3 to gcloud storage
gsutil -m cp -R s3://whrc-v4-processed gs://wri-public/tsc_drivers/2018/global

If there are failures:

  1. get missing files
# bash
aws s3 ls whrc-v4-processed
gsutil ls gs://wri-public/tsc_drivers/2018/global
# python
...
aws_df[~aws_df.filename.isin(gs_df.filename)].to_csv('/Users/brook/WRI/code/TSC_Drivers/todo_files.csv',index=False)
  1. Copy missing files
FILES=( 00N_010E_biomass.tif 00N_020E_biomass.tif 00N_030E_biomass.tif ... )

for f in "${FILES[@]}"
do
    echo "AWS->S3: "$f
    gsutil cp s3://whrc-v4-processed/${f} gs://wri-public/tsc_drivers/2018/global/${f}
done

tsc_drivers's People

Contributors

brookisme avatar jterry64 avatar

Watchers

 avatar James Cloos avatar Christian Aldridge avatar Forrest Follett avatar Thomas Maschler avatar  avatar Rutger Hofste avatar Radost Stanimirova avatar  avatar

tsc_drivers's Issues

how to download drivers tiff files

Hello,

We are graduates who are currently studying deforestation in South East Asia.
We found forest loss drivers data on GFW very helpful, but it only provide multi-year tiff file.
I saw this data API on https://data-api.globalforestwatch.org/, but it seems unbale to work.
So could you please let me know if there is a way to download such data in single year format?

Thanks!

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.