| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
Ā | Ā | |||
This shell script parses data from the Food and Agriculture Organization of the United Nations about the cultivated/planted plants/fruits on the world into a YAML file, which groups them per country to see the top 15.
It has been created for the OpenStreetMap mapping app StreetComplete, see this issue for details.
Go to the FAQ website and download the FAO data. Things to remember:
The script is mostly POSIX-compliant, so it should work on all systems, but a CLI tool called csvtool has to be installed as it is used as a CSV parser.
If this is done, you can just execute it:
$ ./parseCrops.sh source/area_harvested_2019+2020.csv result/OsmOnly/mostAreaHarvest_2019+2020.yml
Prepare CSVā¦
Adjusting datasetsā¦
Sum up duplicate elementsā¦
Summed up 289 duplicates.
Calculate yearly averageā¦
Sort dataā¦
Evaluate dataā¦
WARNING: No language code for China could be found. Skip.
Finish processingā¦The language code warning for China is to be expected, see the contributing guide for details.
This is an overview of what happens:
The results can be seen in the directory result. All legacy and more up-to-date data are included.
The script can handle multiple data from multiple years quite well. After summing up equal items per year (and country) it later calculates the average of the production numbers from both years.
Additionally, there is a collection of square images of all "OSM fruits", which are included in the top-15. You can find it in the directory images.
The data taken from the FAO is licensed under the terms they describe, i.e. CC BY-NC-SA 3.0 IGO. This is described in detail in this document.
Apart from that, all code part is licensed under the MIT license.
| Back | FazBrowse Home | New Git URL |