Name | better-hydroponics JSON |
Version |
0.1.3
JSON |
| download |
home_page | None |
Summary | Simulation of hydroponic farming |
upload_time | 2024-05-23 14:50:53 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 by Nils Theeten <nils.theeten@epfl.ch> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
hydroponics
plant growth
ph calculation
solution solubility
plant simulation
solution maker
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![Project Logo](assets/Banner.webp)
![Coverage Status](assets/coverage-badge.svg)
<h1 align="center">
Project Hydroponic simulation
</h1>
<br>
This python package aims to provide some basic tools to simulate hydroponic plant growing.🌱 Hydroponics is a farming method where plants grow without soil and instead use a solution containing the required mineral nutriments.👨🌾 This technique is already widely used because it is more efficient in water usage and is in development for farming on mars.🪐🚀
In particular, this package allows you to simulate the concentration of minerals and the pH of hydroponic solutions, determine the pH and check the solubility among others.
See the "Basic Usage" section below and "example.ipynb" document for further examples and explainantions of the package.
Also see the Githubwebpages associated with this project to see the full documentation: [hydroponics](https://nilstheeten.github.io/Project_ppchem/index.html).
Learn more about hydropics with the following links:
- [Wikipedia](https://en.wikipedia.org/wiki/Hydroponics#:~:text=Hydroponics%20is%20a%20type%20of,solutions%20in%20an%20artificial%20environment)
- [USDA](https://www.nal.usda.gov/farms-and-agricultural-production-systems/hydroponics)
- [NASA](https://www.nasa.gov/science-research/nasa-plant-researchers-explore-question-of-deep-space-food-crops/)
<br>
## 0. Usage 🔥
```python
import hydroponics as hp
plant_name = "Tomato"
required_nutriments = {"Na+": 0.1, "NO3(-)": 0.5, "K+": 0.2} #minerals needed by the plant
solution = {"Na+": 0.2, "NO3(-)": 0.6, "K+": 0.3} #composition of the solution {"ion_name":conc. [g/L]}
analysed_ions = ["Na+", "NO3(-)", "K+"] #ions for which the conc. will be analysed
volume = 2 #L
growth_time = 20 #days
forbidden_ions = ["Cl-"] #ions you don't want in the solution
# Generate an awsome simulation report (PDF)
hp.generate_report(plant_name, required_nutriments, growth_time, analysed_ions, solution, volume, forbidden_ions = forbidden_ions)
```
This usage example shows how to quickly use the package's main functionality: `generate_report` that will provide a lot of essential informations of the simulation. 📝
<br>
## 1. Installation 👩💻
> Everything is just one pip install away - philippe schwaller
<br>
The following *pip command* can be used to install the python package. The package was made with python 3.10
```
pip install better-hydroponics
```
Be aware, the package uses the following dependencies:
* Numpy (1.26.4)
* Pandas (2.2.2)
* matplotlib (3.8.4)
* sympy (1.12)
* openpyxl (3.1.2)
Please install the dependencies with their according `pip install` commands in the right environment.
<br>
## 2. Basic Usage
The package uses python dictionaries to store the concentration of the different salts/ion in the solution. By default concentrations are given in [g/L]. However different functions exist to convert g/L to mol/L and inversly.
Start by importing the package:
```python
import hydroponics as hp
```
To determine the quantity of each salt to add to the solution to obain the desired concentration of each ion one can use the `make_solution` function. This function checks the solubility of the salt. 🧑🔬
```python
ion_composition = {"K+":0.1, "Cl-": 0.3, "H2PO4(-)":0.5, "Ca(2+)":0.4} #desired concentrations in [g/L]
volume = 10 #L
forbidden_ions = ["Li+", "SO4(2-)"]
salts_to_add = hp.make_solution(ion_composition, volume, forbidden_ions)
print(salts_to_add)
```
One can visualise the evolution of the concentration of the ions as the plant grows with the `plot_graph` function.
```python
#Define the variables
solution = {"Na+": 0.2, "NO3(-)": 0.6, "K+": 0.3} #composition of the solution {"ion_name":conc. [g/L]}
required_nutriments = {"Na+": 0.1, "NO3(-)": 0.5, "K+": 0.2} #minerals needed by the plant
growth_time = 20 #days
volume = 5 #L
#plot a figure that shows the concentration of ions as a function of time.
#The figure is directly downloaded in the current directory.
hp.plot_graph(solution, "ion", required_nutriments, growth_time, volume)
```
One can determine the pH of the solution given the concentration of the ions with the `pH_approximation` function:
```python
solution = {"K+":0.1, "Cl-": 0.3, "H2PO4(-)":0.5, "Ca(2+)":0.4}
temperature = 25 #°C
pH = hp.pH_approximation(solution, temperature)
print(pH)
```
<br>
See the "tutorial.ipynb" notebook for more complete examples.
Or visit [hydroponics](https://nilstheeten.github.io/Project_ppchem/index.html) to see the full documentation of the package.
<br>
## 3. Datasets
This package uses data from the PRIF17 ([link](https://www.agroscope.admin.ch/agroscope/en/home/topics/plant-production/field-crops/Pflanzenernaehrung/grud.html)) and the wikipedia page about solubility ([wiki](https://en.wikipedia.org/wiki/Solubility_table)).
Accuracy of the results of the package are not guaranteed.
Some solutions and plant compositions are predefined (bell pepper 🫑, cucumber 🥒 and eggplant 🍆), please define a new dict or complete the excel file to use other solutions and new plants.
<br>
## 4. Licence and References
This package is under MIT license.
Please click on the MIT sign for further information
Raw data
{
"_id": null,
"home_page": null,
"name": "better-hydroponics",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "hydroponics, plant growth, pH calculation, solution solubility, plant simulation, solution maker",
"author": null,
"author_email": "Nils Theeten <nils.theeten@epfl.ch>, Mathieu Penn <mathieu.penn@epfl.ch>",
"download_url": "https://files.pythonhosted.org/packages/4e/2b/03de628700cc05a1a52c36890ea364ed9cc716672da010052ea7fcd7f5d8/better_hydroponics-0.1.3.tar.gz",
"platform": null,
"description": "![Project Logo](assets/Banner.webp)\r\n\r\n![Coverage Status](assets/coverage-badge.svg)\r\n\r\n<h1 align=\"center\">\r\nProject Hydroponic simulation\r\n</h1>\r\n\r\n<br>\r\n\r\nThis python package aims to provide some basic tools to simulate hydroponic plant growing.\ud83c\udf31 Hydroponics is a farming method where plants grow without soil and instead use a solution containing the required mineral nutriments.\ud83d\udc68\u200d\ud83c\udf3e This technique is already widely used because it is more efficient in water usage and is in development for farming on mars.\ud83e\ude90\ud83d\ude80\r\n\r\nIn particular, this package allows you to simulate the concentration of minerals and the pH of hydroponic solutions, determine the pH and check the solubility among others.\r\nSee the \"Basic Usage\" section below and \"example.ipynb\" document for further examples and explainantions of the package.\r\n\r\nAlso see the Githubwebpages associated with this project to see the full documentation: [hydroponics](https://nilstheeten.github.io/Project_ppchem/index.html).\r\n\r\nLearn more about hydropics with the following links: \r\n - [Wikipedia](https://en.wikipedia.org/wiki/Hydroponics#:~:text=Hydroponics%20is%20a%20type%20of,solutions%20in%20an%20artificial%20environment)\r\n - [USDA](https://www.nal.usda.gov/farms-and-agricultural-production-systems/hydroponics)\r\n - [NASA](https://www.nasa.gov/science-research/nasa-plant-researchers-explore-question-of-deep-space-food-crops/)\r\n\r\n<br>\r\n\r\n## 0. Usage \ud83d\udd25\r\n\r\n```python\r\nimport hydroponics as hp\r\n\r\nplant_name = \"Tomato\"\r\nrequired_nutriments = {\"Na+\": 0.1, \"NO3(-)\": 0.5, \"K+\": 0.2} #minerals needed by the plant\r\nsolution = {\"Na+\": 0.2, \"NO3(-)\": 0.6, \"K+\": 0.3} #composition of the solution {\"ion_name\":conc. [g/L]}\r\nanalysed_ions = [\"Na+\", \"NO3(-)\", \"K+\"] #ions for which the conc. will be analysed\r\nvolume = 2 #L\r\ngrowth_time = 20 #days\r\nforbidden_ions = [\"Cl-\"] #ions you don't want in the solution\r\n\r\n# Generate an awsome simulation report (PDF)\r\nhp.generate_report(plant_name, required_nutriments, growth_time, analysed_ions, solution, volume, forbidden_ions = forbidden_ions)\r\n\r\n```\r\n\r\nThis usage example shows how to quickly use the package's main functionality: `generate_report` that will provide a lot of essential informations of the simulation. \ud83d\udcdd\r\n\r\n<br>\r\n\r\n## 1. Installation \ud83d\udc69\u200d\ud83d\udcbb\r\n\r\n > Everything is just one pip install away - philippe schwaller\r\n<br>\r\n\r\nThe following *pip command* can be used to install the python package. The package was made with python 3.10\r\n```\r\npip install better-hydroponics\r\n```\r\n \r\nBe aware, the package uses the following dependencies:\r\n * Numpy (1.26.4)\r\n * Pandas (2.2.2)\r\n * matplotlib (3.8.4)\r\n * sympy (1.12)\r\n * openpyxl (3.1.2)\r\n\r\nPlease install the dependencies with their according `pip install` commands in the right environment.\r\n\r\n<br>\r\n\r\n## 2. Basic Usage \r\nThe package uses python dictionaries to store the concentration of the different salts/ion in the solution. By default concentrations are given in [g/L]. However different functions exist to convert g/L to mol/L and inversly.\r\n\r\nStart by importing the package:\r\n\r\n```python\r\nimport hydroponics as hp\r\n```\r\n\r\nTo determine the quantity of each salt to add to the solution to obain the desired concentration of each ion one can use the `make_solution` function. This function checks the solubility of the salt. \ud83e\uddd1\u200d\ud83d\udd2c\r\n\r\n```python\r\nion_composition = {\"K+\":0.1, \"Cl-\": 0.3, \"H2PO4(-)\":0.5, \"Ca(2+)\":0.4} #desired concentrations in [g/L]\r\nvolume = 10 #L\r\nforbidden_ions = [\"Li+\", \"SO4(2-)\"]\r\n\r\nsalts_to_add = hp.make_solution(ion_composition, volume, forbidden_ions)\r\nprint(salts_to_add)\r\n\r\n```\r\n\r\nOne can visualise the evolution of the concentration of the ions as the plant grows with the `plot_graph` function.\r\n\r\n```python\r\n#Define the variables\r\nsolution = {\"Na+\": 0.2, \"NO3(-)\": 0.6, \"K+\": 0.3} #composition of the solution {\"ion_name\":conc. [g/L]}\r\nrequired_nutriments = {\"Na+\": 0.1, \"NO3(-)\": 0.5, \"K+\": 0.2} #minerals needed by the plant\r\ngrowth_time = 20 #days\r\nvolume = 5 #L\r\n\r\n#plot a figure that shows the concentration of ions as a function of time.\r\n#The figure is directly downloaded in the current directory.\r\nhp.plot_graph(solution, \"ion\", required_nutriments, growth_time, volume)\r\n\r\n```\r\n\r\nOne can determine the pH of the solution given the concentration of the ions with the `pH_approximation` function:\r\n\r\n```python\r\nsolution = {\"K+\":0.1, \"Cl-\": 0.3, \"H2PO4(-)\":0.5, \"Ca(2+)\":0.4}\r\ntemperature = 25 #\u00b0C\r\npH = hp.pH_approximation(solution, temperature)\r\nprint(pH)\r\n```\r\n<br>\r\n\r\nSee the \"tutorial.ipynb\" notebook for more complete examples.\r\n\r\nOr visit [hydroponics](https://nilstheeten.github.io/Project_ppchem/index.html) to see the full documentation of the package.\r\n\r\n<br>\r\n\r\n## 3. Datasets \r\n\r\nThis package uses data from the PRIF17 ([link](https://www.agroscope.admin.ch/agroscope/en/home/topics/plant-production/field-crops/Pflanzenernaehrung/grud.html)) and the wikipedia page about solubility ([wiki](https://en.wikipedia.org/wiki/Solubility_table)).\r\n\r\nAccuracy of the results of the package are not guaranteed.\r\n\r\nSome solutions and plant compositions are predefined (bell pepper \ud83e\uded1, cucumber \ud83e\udd52 and eggplant \ud83c\udf46), please define a new dict or complete the excel file to use other solutions and new plants.\r\n\r\n\r\n<br>\r\n\r\n## 4. Licence and References \r\nThis package is under MIT license.\r\n\r\nPlease click on the MIT sign for further information\r\n\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 by Nils Theeten <nils.theeten@epfl.ch> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Simulation of hydroponic farming",
"version": "0.1.3",
"project_urls": {
"source": "https://github.com/NilsTheeten/hydroponics",
"tracker": "https://github.com/NilsTheeten/hydroponics/issues"
},
"split_keywords": [
"hydroponics",
" plant growth",
" ph calculation",
" solution solubility",
" plant simulation",
" solution maker"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3e3abcb962c54c124ac9c6839e1c951bcc78bb4d3c12d2678b653e8bb797d8f7",
"md5": "fec8d94c3ff48f0e33212f2d2c8fd265",
"sha256": "3f6166a3f73502ef015bfb86d31f4383e84ca45124eae20550f7f38c8be8a22b"
},
"downloads": -1,
"filename": "better_hydroponics-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fec8d94c3ff48f0e33212f2d2c8fd265",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 46153,
"upload_time": "2024-05-23T14:50:51",
"upload_time_iso_8601": "2024-05-23T14:50:51.525556Z",
"url": "https://files.pythonhosted.org/packages/3e/3a/bcb962c54c124ac9c6839e1c951bcc78bb4d3c12d2678b653e8bb797d8f7/better_hydroponics-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4e2b03de628700cc05a1a52c36890ea364ed9cc716672da010052ea7fcd7f5d8",
"md5": "e12950950fcb8634e7e9caba72778d7f",
"sha256": "cdce0d762e9829407ce820ba45bfe133f870b7452fd781c564797aaf09ac7cfe"
},
"downloads": -1,
"filename": "better_hydroponics-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "e12950950fcb8634e7e9caba72778d7f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 75624,
"upload_time": "2024-05-23T14:50:53",
"upload_time_iso_8601": "2024-05-23T14:50:53.532920Z",
"url": "https://files.pythonhosted.org/packages/4e/2b/03de628700cc05a1a52c36890ea364ed9cc716672da010052ea7fcd7f5d8/better_hydroponics-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-23 14:50:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NilsTheeten",
"github_project": "hydroponics",
"github_not_found": true,
"lcname": "better-hydroponics"
}