Downloading Forest Foresight data
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:
# Set your download folder
download_folder <- "path/to/your/download/folder"
# Choose an identifier (country code, tile ID, or SpatVector)
identifier <- "PER" # Example: Peru
identifier <- shape
# Call the ff_sync function
ff_sync(
ff_folder = download_folder,
identifier = identifier,
download_model = TRUE,
download_data = TRUE,
download_predictions = TRUE,
verbose = TRUE
)
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
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.