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:
Download and install Cyberduck from The Cyberduck home page
Open Cyberduck and click on "Open Connection"
Choose "S3 (HTTPS)" from the dropdown menu. This should be at the bottom. If it is not:
select from the dropdown the option “More Options…”
Go to the tab Profiles
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
Enter the following details:
Server: http://s3.amazonaws.com
Access Key ID: (leave blank)
Secret Access Key: (leave blank)
More Options > Path: forestforesight-public
Click "Connect"
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/
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.
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: