/
Data Repository

Data Repository

Every month the Forest Foresight Global team creates predictions for all countries between 30 degrees north and south latitude. The predictions can be downloaded directly.

 

If we want to train a model or predict with a trained model we will need input data. ForestForesight has created a lot of features that can be used as input. We will use the ff_sync option or Cyberduck to download.

Method 1: Using ff_sync

To use the ff_sync function, you'll need to have R installed along with the ForestForesight package. Here's how to use it: 

library(ForestForesight)# this will load the FF library and the variables in the config.yml file # Make sure you have DATA_FOLDER in config.yml in your working directory download_folder <- Sys.getenv("DATA_FOLDER")  # Choose an identifier (country code, tile ID, or SpatVector) identifier <- "PER"  # Example: Peru identifier <- shape # Make sure this is a valid SpatVector object.   # Call the ff_sync function  ff_sync(   ff_folder = download_folder,   identifier = identifier,   download_model = TRUE,   download_data = TRUE,   download_predictions = TRUE,   verbose = TRUE

For more information about the config file please refer to the configuration page here Open-Source Contribution .  

This will download the preprocessed data, model, and predictions for Peru or for the shape that you selected earlier in Loading the Area Of Interest (AOI) to the specified folder.

Method 2: Using Cyberduck (or other FTP client)

Cyberduck is a user-friendly FTP and cloud storage browser. Here's how to use it to download the ForestForesight data:

  1. Download and install Cyberduck from The Cyberduck home page

  2. Open Cyberduck and click on "Open Connection"

  3. Choose "S3 (HTTPS)" from the dropdown menu. This should be at the bottom. If it is not:

    1. select from the dropdown the option “More Options…”

    2. Go to the tab Profiles

    3. Search for S3 (HTTPS), check the box and now you can close that window and it should be in the main dropdown at the bottom

  4. Enter the following details:

    • Server: http://s3.amazonaws.com

    • Access Key ID: (leave blank)

    • Secret Access Key: (leave blank)

    • More Options > Path: forestforesight-public

      image-20241104-122107.png

  5. Click "Connect"

  6. You should now see the ForestForesight bucket structure. Navigate to the folders you want:

    • For preprocessed data: /preprocessed/input/ and /preprocessed/groundtruth/

    • For models: /models/

    • For predictions: /predictions/

  7. Find the country or tile you're interested in and download the relevant files by dragging them to a folder on your computer. For an overview of the tiles, check here.

 

data structure.jpg

 

 

Remember that the ForestForesight dataset is large, so downloading might take a while depending on your internet connection and how much data you're fetching.

Both methods will allow you to download the preprocessed data, models, or predictions. The ff_sync function is more programmatic and can be easily integrated into R workflows, while Cyberduck provides a user-friendly graphical interface for browsing and downloading files manually.

Method 3: Direct Download from AWS S3 Bucket

Forest Foresight predictions are stored in a public AWS S3 bucket, providing flexible and powerful access options for users with varying technical expertise.

  • Bucket Name: forestforesight-public

  • Region: eu-west-1

  • Structure:

    • Root folder: 'predictions'

    • Subfolders: ISO-3 country codes (e.g., 'BRA', 'IDN', 'COD')

    • File naming convention: [ISO-3 CODE]_[YYYY-MM-DD].tif

For example, a prediction file for Brazil for January 1, 2024, would be located at:
predictions/BRA/BRA_2024-01-01.tif

This structure allows for easy navigation and retrieval of country-specific predictions over time.

For simple, one-off downloads, users can access files directly through their web browser using the S3 HTTP URL format:

<https://forestforesight-public.s3.eu-west-1.amazonaws.com/predictions/[ISO-3> CODE]/[ISO-3 CODE]_[YYYY-MM-DD].tif

For example:

<https://forestforesight-public.s3.eu-west-1.amazonaws.com/predictions/BRA/BRA_2024-01-01.tif>

 

Method 4: Using the AWS Command Line Interface (CLI)

Example commands:

Method 5: Using Python with boto3

Example script:

 

Related content

Accessing the Data (Open Access)
Accessing the Data (Open Access)
More like this
Downloading Forest Foresight data
Downloading Forest Foresight data
More like this
Q&A
More like this
Building your own predictions (Open Source)
Building your own predictions (Open Source)
More like this
Technical Deep Dive
Technical Deep Dive
More like this
Loading the predictions in ArcGIS
Loading the predictions in ArcGIS
More like this