# Pasture Condition Scores (NRCS:pasture-condition-score:1.0)

**URL:** <https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520>\
**Category:** Conventions\
**Tags:** convention-proposal\
**Created:** [February 8, 2023, 8:59pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520 "2023-02-08T20:59:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 8, 2023, 8:59pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520/1 "2023-02-08T20:59:13Z")

</div>

The NRCS provides a Pasture Condition Score Sheet as a way of standardizing the observation of pasture condition: [https://www.nrcs.usda.gov/sites/default/files/2022-09/Pasture%20Condition%20Score%20Sheet.pdf](https://www.nrcs.usda.gov/sites/default/files/2022-09/Pasture%20Condition%20Score%20Sheet.pdf)

I started a branch in the farmOS NRCS module that proposes a convention for it: [farm\_nrcs/index.md at 2.x-pcs · mstenta/farm\_nrcs · GitHub](https://github.com/mstenta/farm_nrcs/blob/2.x-pcs/conventions/NRCS/pasture-condition-score/1.0/index.md)

As well as a quick form: [farm\_nrcs/PCS.php at 2.x-pcs · mstenta/farm\_nrcs · GitHub](https://github.com/mstenta/farm_nrcs/blob/2.x-pcs/modules/quick_pcs/src/Plugin/QuickForm/PCS.php)

I’m tracking the feature request here: [Quick Form: Pasture Condition Score Sheet [#3336217] | Drupal.org](https://www.drupal.org/project/farm_nrcs/issues/3336217)

… would love to hear more general thoughts in this thread!

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 9:45pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520/2 "2023-02-09T21:45:31Z")

</div>

Some questions:

- How is this supposed to work with localization? I notice your quick form implementation wraps the indicator titles in `$this->t()`, but the convention specification doesn’t say anything about translated indicator quantity labels being permissible.
- The specification seems light on whether all the indicators are required for every log. Obviously not populating any of them would impact the score right? Presumably, if not all indicators are required, then this creates an implicitly allowed extra value of zero - even though the spec says only 1 - 5 are allowed.
- It is surprising to me that the “purpose” section of the convention specification describes how the overall score is calculated, but that formula is not repeated with a “MUST” in the actual “specification” section.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 10, 2023, 1:51pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520/3 "2023-02-10T13:51:48Z")

</div>

Thanks for reviewing @Symbioquine! Great points/questions…

> [@Symbioquine](#):
>
> How is this supposed to work with localization?

This is a really big question! Maybe it deserves a forum topic of its own in the Conventions category. I will start one and leave some ideas there…

> [@Symbioquine](#):
>
> I notice your quick form implementation wraps the indicator titles in `$this->t()`, but the convention specification doesn’t say anything about translated indicator quantity labels being permissible.

Perhaps `$this->t()` should _not_ be used for these labels in the quick form… at least until we decide how to handle localization more generally in conventions.

> [@Symbioquine](#):
>
> The specification seems light on whether all the indicators are required for every log. Obviously not populating any of them would impact the score right?

Good point. They should all be required. I will update the proposed spec to make this explicit.

> [@Symbioquine](#):
>
> It is surprising to me that the “purpose” section of the convention specification describes how the overall score is calculated, but that formula is not repeated with a “MUST” in the actual “specification” section.

Another good point! I will change the spec from:

> The quantity “Value” (`value`) for the overall score MUST be a whole number between 1 and 50.

To:

> The quantity “Value” (`value`) for the overall score MUST be a whole number between 1 and 50, which equals the sum of the ten indicator values.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 10, 2023, 1:58pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520/4 "2023-02-10T13:58:24Z")

</div>

I pushed two commits to the `2.x-pcs` branch:

> <https://github.com/farmOS/farm_nrcs/commit/753a9e268859dfb2d3edf5ea7a9c666b9ffc7f89>

> <https://github.com/farmOS/farm_nrcs/commit/894a3a9903cc276d69e1e0b9fe2d37304fcf39dc>

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 10, 2023, 2:02pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520/5 "2023-02-10T14:02:17Z")

</div>

> [@mstenta](#):
>
> This is a really big question! Maybe it deserves a forum topic of its own in the Conventions category. I will start one and leave some ideas there…

> [@Convention localization?](https://farmos.discourse.group/t/convention-localization/1525):
>
> @Symbioquine raised an important question in his review of the [Pasture Condition Score](https://farmos.discourse.group/t/pasture-condition-scores/1520) convention proposal: In that specific case, the convention dictates that an observation log should be created with a set of quantities that have specific labels (in English). That’s just one example where localization/translation considerations will come up in conventions… How should language translations / localization be handled more generally in conventions? Let’s use this thread to discuss.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 10, 2023, 4:43pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520/6 "2023-02-10T16:43:38Z")

</div>

Cross-posting this by @Symbioquine:

> [@▣🔗 Asset Link - Use-case Drive](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/15):
>
> I did a rudimentary port of the [Pasture Condition Score quick form](https://github.com/mstenta/farm_nrcs/blob/aacb38984ab53dfa2e5a45fb4b6ee738052016f8/modules/quick_pcs/src/Plugin/QuickForm/PCS.php) ([context](https://farmos.discourse.group/t/pasture-condition-scores/1520)) to an Asset Link plugin: [RecordPastureConditionScore.alink.vue](https://gist.github.com/symbioquine/5fdd2b8a2bbe5fc099c25714a7ea927f#file-recordpastureconditionscore-alink-vue) Note: I didn’t include the date field, but that would be trivial to add - just a [QDate widget](https://quasar.dev/vue-components/date) whose output gets formatted as RFC3339 and passed as part of creating the observation log. import { formatRFC3339 } from 'assetlink-plugin-api';

And:

> [@▣🔗 Asset Link - Use-case Drive](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/23):
>
> Holy cow I missed this! That’s awesome @Symbioquine! A perfect example of using a convention specification to develop a tool that creates comparable data! smile Sheesh we need the ability to tag the “intended convention” of records like I described in [https://www.drupal.org/project/farm/issues/3336224](https://www.drupal.org/project/farm/issues/3336224) - hopefully we can decide on a direction for that soon, so that tools like this can tag the convention when they create records!

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 10, 2023, 4:55pm UTC](https://farmos.discourse.group/t/pasture-condition-scores-nrcs1-0/1520/7 "2023-02-10T16:55:33Z")

</div>

The quote above is a bit misleading, the current version does include the date field;

> [@▣🔗 Asset Link - Use-case Drive](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/22):
>
> I updated this to include the date field and fix a bug where the scores were being recorded as “count” rather than “value” measures.

[https://user-images.githubusercontent.com/30754460/218139303-e2adba13-f246-4451-b405-9a1fa3104668.webm](https://user-images.githubusercontent.com/30754460/218139303-e2adba13-f246-4451-b405-9a1fa3104668.webm)

I think the main divergence of this implementation from the convention spec at the moment is that you can submit the form without providing all the values - which leaves them set to zero in the resulting log.
