ACAP 2.0 Crop Recommendations

Introduction

ℹ️

This section describes methods for uploading the ACAP 2.0 recommendations dataset, whose latest stable version is Release/Tag version v10.1.0-alpha.10, accessible in the acap-v2 repository.

Follow this link to view upload instructions for the older ACAP 1.0 recommendations dataset.

Data Format

⚠️

The latest updates for ACAP 2.1, starting with @commit 95a97cd in the acap-v2 dev branch, use a new Crop Recommendations Excel template different from the ones mentioned on this page.

These Crop Recommendations are only compatible up to @commit ee49568 in the acap-v2 dev branch.

Kindly chat the ACAP group chat for more information about the new Crop Recommendations Excel file for ACAP 2.1. Alternatively, you may use the temporary workaround (opens in a new tab) until a final update to ACAP's ongoing items (opens in a new tab) becomes available.

ACAP 2.0 uses recommendations data similar to the ACAP 1.0 raw data, added with climate risk information and exclusion of several Excel columns. View its raw EXCEL data files in the /server/src/scripts/data/dataset_v2.0 directory to gain insight into its new contents and data structure.

The samples only display the ACAP 2.0 recommendations dataset for the Rice and Corn crops.

            • rice_recommendations_v4.xlsx
            • corn_recommendations_v3.xlsx
  • ⚠️

    The crop stage labels should match the crop stage codes defined in the ACAP 2.0 cropping calendar Excel files specific to target crops to ensure the correct association of crop stages with target recommendations.

    💡

    Support for Multiple Crops
    Developers can add crop stages and labels for other crops, following the crop stages code and label format in the /client/src/utils/constants.js file and by creating recommendations datasets for other crops similar to the sample recommendations Excel files described in the Data Format section as a reference.

    Upload Recommendations

    ACAP 2.0 uploads its recommendations dataset using an upload form on the Manage Recommendations page, requiring Admin login.

    ⚠️

    The crop stage labels should match the crop stage codes defined in the ACAP 2.0 cropping calendar Excel files specific to target crops to ensure the correct association of crop stages with target recommendations.

    Prepare the frontend / backend

    Update the frontend and backend codes with necessary data for supporting other crops, with data formats described in the Data Format section.

    ℹ️

    Overwrite and commit the sample cropping calendar Excel template files rice_recommendations_v4.xlsx and corn_recommendations_v3.xlsx in the server directory with the correct regional recommendation files to change the default sample Excel templates during live deployment.

    Also, change the values of the environment variables (RECOMMENDATIONS_RICE_EXCEL_FILE, RECOMMENDATIONS_CORN_EXCEL_FILE) associated with its file names in the client .env file and GitHub Secrets if there is a need to use different file names or add new templates.

    NOTE: This step is compatible until @commit 95a97cd (latest updates) in the acap-v2 dev branch. However, the default crop recommendations Excel templates inside the repository only work until the previous updates @commit ee49568 (pre-ACAP 2.1). Kindly chat the ACAP group chat for more information about the new Crop Recommendations Excel file format and management for ACAP 2.1 if it's missing in the online documentation.

    Login as Admin

    Login as an ACAP admin, then, navigate to the Recommendations Management page in the /admin/manage-recommendations route.

    Upload Recommendations

    1. Upload Recommendations: Select a "Crop Type" from the available crops list and select options.
    2. Upload an Excel file: Press the SEARCH icon.
    3. Browse for a recommendations Excel dataset that corresponds to the selected Crop Type in step #1.
    4. Press the UPLOAD button.
    5. Wait for the upload success or fail status response to appear.