CropGuardian-SoilMetrics-CSharp 1.0.1

dotnet add package CropGuardian-SoilMetrics-CSharp --version 1.0.1                
NuGet\Install-Package CropGuardian-SoilMetrics-CSharp -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CropGuardian-SoilMetrics-CSharp" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CropGuardian-SoilMetrics-CSharp --version 1.0.1                
#r "nuget: CropGuardian-SoilMetrics-CSharp, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CropGuardian-SoilMetrics-CSharp as a Cake Addin
#addin nuget:?package=CropGuardian-SoilMetrics-CSharp&version=1.0.1

// Install CropGuardian-SoilMetrics-CSharp as a Cake Tool
#tool nuget:?package=CropGuardian-SoilMetrics-CSharp&version=1.0.1                

CropGuardian-SoilMetrics-CSharp

NOTE: This is an updated release programmed in C# v12 and NET 8. This version offers greater flexibility than the F# version previously released. Due to the number of C# developers I've elected to add more functionality to this library upon initial release. I will be updating the F# version as time permits.

CropGuardian-SoilMetrics-CSharp -Version 1.0.1 is a .NET library designed to help farmers, agronomists, and developers analyze soil health, nutrient levels, and moisture data to provide actionable recommendations for soil fertilization. This library supports real-time IoT integration for live soil data collection and generates precise nutrient deficiency reports with fertilizer recommendations.

Features

  • Nutrient Analysis: Analyze soil nutrient levels and provide recommendations for nitrogen, phosphorus, potassium, and more.
  • Fertilization Recommendations: Suggest fertilizer types and amounts based on the nutrient deficiencies detected in the soil.
  • Soil Moisture Analysis: Provide recommendations based on soil moisture levels, helping optimize nutrient uptake.
  • IoT Integration: Not Fully Implemented Yet.

Installation

The library is available as a NuGet package. You can install it via the NuGet Package Manager or the .NET CLI:

NuGet Package Manager
Install-Package CropGuardian-SoilMetrics-CSharp -Version 1.0.1
.NET CLI
dotnet add package CropGuardian-SoilMetrics-CSharp --version 1.0.1

Usage

After installing the package, you can use the library to analyze soil data and receive fertilization recommendations.

Example: Nutrient and Soil Moisture Analysis
using SoilHealth.Models;
using SoilHealth.Services;
using System;

class Program
{
    static void Main()
    {
        // Create a mock provider for crop nutrient sufficiency (e.g., Corn at Tasselling stage)
        var cropProvider = new StaticCropProvider();
        
        // Simulated soil data (e.g., soil nutrient and moisture percentages)
        var soilDataService = new MockSoilDataService(new SoilNutrientData(2.0f, 0.3f, 1.5f, 0.5f, 0.3f, 0.2f, 80.0f, 60.0f, 8.0f, 25.0f, 20.0f, 35.0f));
        
        // Create the SoilAnalysisService
        var soilAnalysisService = new SoilAnalysisService(cropProvider, soilDataService);

        // Analyze soil for a given crop and growth stage
        var recommendations = soilAnalysisService.AnalyzeSoil("Corn", "Tasselling");

        // Display recommendations
        foreach (var recommendation in recommendations)
        {
            Console.WriteLine(recommendation);
        }
    }
}
Output Example:
Nitrogen (N) is low. Apply 1.08 kg/ha of Urea.
Phosphorus (P) is within the optimal range.
Soil moisture is within the optimal range (35%).

License

This project is licensed under the GNU General Public License version3 - see the LICENSE file for details.


Release Notes

v1.0.1

  • Initial release with support for nutrient analysis, soil moisture recommendations, and IoT integration. The IoT portions have not yet been implemented. To see the future plans of the project please visit the project repository.

Contact

For any questions or support, feel free to reach out to Trent Adams via cropguardiansoft@gmail.com.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 137 9/13/2024

Initial release with core soil analysis features: nutrient deficiency detection, soil moisture analysis, and fertilizer recommendations.