Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Code Block
# 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:

  1. Download and install Cyberduck from https://cyberduck.io/

  2. Open Cyberduck and click on "Open Connection"

  3. Choose "S3 (Amazon Simple Storage Service)" from the dropdown menu

  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

  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.

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.