Improve mixed crop detection (remove Dominance) and allow flexible plot aesthetics

Open
#138 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r

Research direction

Start by locating the mixed-crop detection that currently relies on Dominance and the plotting functions that assign intercropping aesthetics. Read how Plant, Genotype, and the sim/obs columns are represented and used; the issue does not name specific files or tests. Done means mixed stands can be identified and labeled with Stand_type, while users can customize aesthetics from selected columns or combinations.

Written by the indexing model from the issue text.

Description

enhancement

Description

Currently, the detection of intercropping (mixed crops) in CroPlotR relies solely on the Dominance column. Graphical outputs also automatically distinguish intercropping results by both species and crop role (main vs. associated), which can lead to unnecessary complexity in the figures.

There are two points to address:

  1. Detection of mixed crops

    • The current approach uses the Dominance column.
    • A more robust method would be to detect mixed crops based on the Plant column, or Plant combined with Genotype when available, by checking for different plants or genotypes simulated on the same date.
    • In such cases, a new column Stand_type could be added to the data frame with values like Mixed or Monovarietal.
  2. Graphical representation

    • Currently, intercropping is automatically represented in a predefined way.
    • Users may want to distinguish treatments and intercrops differently (e.g., one with colors, the other with symbols), which is difficult with the current approach.
    • It would be helpful to allow the user to define colors and symbols based on the content (total or partial, e.g., if the situation name contains the treatment name) of one or several columns in sim and obs (e.g., Plant, Genotype, or their combination).

Proposed changes

  • Implement mixed crop detection based on Plant (and optionally Genotype) and store the result in a Stand_type column.
  • Modify plotting functions to allow users to map aesthetics (color, symbol) from arbitrary columns or combinations of columns, providing flexibility to distinguish treatments and intercrops.
  • For intercropping plots, consider simplifying default aesthetics by focusing on species/genotypes and Stand_type rather than main/associated crop roles, while still allowing user customization.
Dominant language
R
Stars
1
Forks
3
Avg merge
9h 41m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SticsRPacks/CroPlotR

All issues in SticsRPacks/CroPlotR

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.