Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable avocado for Cyprus #3851

Closed
Oi-sin opened this issue Mar 7, 2022 · 11 comments
Closed

Enable avocado for Cyprus #3851

Oi-sin opened this issue Mar 7, 2022 · 11 comments
Assignees

Comments

@Oi-sin
Copy link

Oi-sin commented Mar 7, 2022

Use case
The quest for setting the type of fruit for an orchard does not offer avocados and mandarins.

Proposed Solution
Add choices for avocados and mandarins:
trees=avocado_trees and
trees=mandarin_trees

@matkoniecz
Copy link
Member

trees=mandarin_trees has 48 uses worldwide https://taginfo.openstreetmap.org/tags/trees=mandarin_trees

trees=avocado_trees has 1664 uses worldwide https://taginfo.openstreetmap.org/tags/trees=avocado_trees

For now, just leave notes with photos. If that turns out to be really popular it may make sense to add such options.

But note that

  • there was significant research to capture really popular crops
  • adding entries adds significant work for translators (2 new entries multiplied by language count)
  • this quest is very rarely solved

@Oi-sin
Copy link
Author

Oi-sin commented Mar 7, 2022

Thanks for the very fast feedback.
I just looked into the code and at least the option for avocados seems to be present already. In orchardProduces.yml there is a list of fruit types per country. Thus this could be easily activated.
The source of this feature requests are orchards in Cyprus.

@matkoniecz matkoniecz reopened this Mar 7, 2022
@matkoniecz matkoniecz changed the title Orchard: further fruit types needed Enable avocado for Cyprus Mar 7, 2022
@matkoniecz
Copy link
Member

matkoniecz commented Mar 7, 2022

@Oi-sin Thanks for catching this, I missed that possibility that it is added and not enabled in a given area.

@rugk Is it possible to activate avocado for Cyprus in way that will be not lost on the regeneration of this metadata?

https://github.com/streetcomplete/StreetComplete/blob/1c5b7b4b964680646d8fd5483cd598a4a17415ac/res/country_metadata/orchardProduces.yml

Is https://github.com/rugk/crops-parser supporting such manual overrides?

@rugk
Copy link
Contributor

rugk commented Mar 7, 2022

Hmm, first of all about the actual request: The quest tags [produce](https://wiki.openstreetmap.org/wiki/Key:produce), not trees aaah now I get, that is just the source for that tag okay.

Is https://github.com/rugk/crops-parser supporting such manual overrides?

No., not really (you can redefine and map the source data) using the crops <-> OSM-key mapping or of course fake the source data to include stuff… 🙃

For the manual additions I also needed to redo them for the last update: #3763
That said, that data is really not regenerated that often (Or does not need to, actually), so one could do that manually every few years.

Or one just has to implement it adds – should not be too hard – if that is the way to go, I'd say one should open an issue in the repo there.


So okay, this is the current entry:

CY: [olive, grape, almond, orange, lemon, lime, grapefruit, plum, apple, peach, tomato, cherry, walnut, banana, apricot, fig]

Note that this is generated based on official data from FAO, who gets their data from the country statistics offices if possible, so only when the country cannot provide any good data this can be inaccurate.

Looking into the source data

So I looked into the source data for Cyprus:
tonnes_harvested_2019+2020_cyprus.csv
tonnes_harvested_2019+2020_cyprus.ods

And all data is official data, except for "Beer of barley" (the other one produced 0 tonnes so we can ignore it…).

Edit: oh gosh I looked at the tonnes (we actually use "area" for SC) and I sorted by item code instead of volume ("value") actually, I should go to sleep… 😲

Here is the same data per area:
area_harvested_2019+2020_cyprus.ods
area_harvested_2019+2020_cyprus.csv

Avocados

(this used tones instead of area, but should still be somewhat correct)

So first important thing I noticed is that Avocados are in there and should appear in the end result actually:
grafik

Their usage even increased in 2020, so maybe there is a bug in the script here?
The mapping if you search in the Crops "DB" for "Avocado" seems to be correct though.
So I have no idea what went wrong here.

Avocados produced in area

grafik

they are in here too, no idea what happens here…

(They just did not increase, so they produced more on the same land in 2020…)

And it can be seen however, that's not really a lot 100ha in a whole country… nevertheless, it should of course be included.

Mandarins

As for mandarines they are unfortunately only provided as aggregated data in Tangerines, mandarins, clementines, satsumas.
If we wanted to include this, we should obviously do so for all countries.

However, the question would be what images and what . Can "normal" people differentiate these fruits? Is there even a separate OSM tagging? (Or should there be?) Or is such a "common group" tagging even allowed here – if even the FAO does not do? (Or should ne you differentiate between these)

I guess to discuss that, I would suggest to open a new issue at https://github.com/rugk/crops-parser/issues specifically for mandarins.

obviously in there in the "area harvest" data too (BTW quite a lot > 100 ha):
grafik

Edit: As for mandarins please also have a look at our inclusion criteria.

@rugk
Copy link
Contributor

rugk commented Mar 7, 2022

Ah btw, the avocado appears in the dataset generated with tonnes, actually BTW – that is even more strange:

CY: [olive, grape, orange, tomato, grapefruit, banana, lemon, lime, peach, apple, fig, strawberry, plum, chilli_pepper, sweet_pepper, avocado, apricot]

https://github.com/rugk/crops-parser/blob/4294f0721842665b6dc0a6aee9482438a10f253a/result/OsmOnly/mostTonnesHarvest_2019%2B2020.yml#L47

@rugk
Copy link
Contributor

rugk commented Mar 7, 2022

Ahhh I now the likely cause for the avocado issue.- My data generation as per it's Readme does this:

It extracts all crops for each country and transforms the first fifteen crops listet into the YAML format.

So it is limited to 15 entries!

In the resulting data for area/CY, I count 16 entries already (uff off-by-one errors are the worst, did not found an xkcd meme hehe), likely avocado is following right after…

Though oh no, this country has 19 entries whaaat… maybe the doc is outdated here I have no idea (and also could not find an issue right now)…

@westnordost
Copy link
Member

okay, @rugk, the solution would be to not limit the entries to any number because the data is not only used to sort the answer options (like for the religion quest or the sports quest) but those options that are not in the list are not available for selection.

The reason for that was that e.g. tropical fruits like bananas are not cultivated at all in e.g. Sweden, so they should not be shown at all. but any fruit that is in some extent cultivated should be selectable.

@rugk
Copy link
Contributor

rugk commented Mar 7, 2022

yeah I know that, but apparently that also is not done currently… this needs more investigation, certainly.

@Oi-sin
Copy link
Author

Oi-sin commented Mar 8, 2022

Hello guys! Thanks for the extended research. I am really sorry for causing sleepless nights with such a simple(?) request.

For those few avocados I could do with writing notes. This works fine. If this issue does not have any implications in countries with a larger area of missing crop types, I would accept the current state :-).

As for the mandarins it will be too difficult for a non botanical or agricultural person to distinguish the types. Reading through https://wiki.openstreetmap.org/wiki/Key:trees and the discussion page there it seems to be a bottomless pit one should not enter.

@rugk
Copy link
Contributor

rugk commented Mar 8, 2022

bottomless pit one should not enter

Well… we are already in there… 🙃 (But I also could not find a specific discussion about mandarins but yeah, I guess we have all decided it's not really a good idea to provide an easy image-mapping feature for that – you'*d need a field guide for that – or some of these cool (AI powered?) apps that can detect that by itself, though that likely won't improve data quality and you may often not get close enough to take a proper photo… 🙃 )

Anyway, I'll tackle the found issues…

@FloEdelmann
Copy link
Member

FloEdelmann commented Mar 13, 2022

I've manually edited orchardProduces.yml now in d84a077, since @rugk already created upstream issues (that should fix this in the long run) in https://github.com/rugk/crops-parser:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants