@harvest-profit/what-if-analysis
v2.2.0
Published
Builds "what if" analysis for Harvest Profit
Downloads
251
Keywords
Readme
The demo can be found published here
Installation
You can install this React Component with a simple:
yarn add @harvest-profit/what-if-analysis
Usage
import React, { Component } from 'react';
import WhatIfAnalysisTable from '@harvest-profit/what-if-analysis';
class WhatIfAnalysis extends Component {
render() {
return (
<WhatIfAnalysisTable
acres={200}
cashPriceWithBasis={2.00}
guaranteedRevenue={569}
totalCost={500 * 200}
aph={115}
yieldIncrement={5}
yieldDecriment={10}
/>
)
}
}
This component can accept the following props:
Name | Required | Description
--- | --- | ---
acres | true | The total acres for a analysis
cashPriceWithBasis | true | The cash price, after the basis has been applied.
guaranteedRevenue | true | The per acre revenue guaranteed by crop insurance.
totalCost | true | The total cost of production.
aph | true | The APH for the given field, or the estimated production.
yieldIncrement | true | Increments upward from the given APH.
yieldDecrement | true | Decrements downward from the given APH.
tableClassName | false | The css class for the overall table. Defaults to table table-responsive
.
cellGreenClassName | false | The css class for cells representing profit. Defaults to table-success
.
cellRedClassName | false | The css class for cells representing loss. Defaults to table-danger
.
cellYellowClassName | false | The css class for cells representing small losses. Defaults to table-warning
.
Development
To get started on this repo, you will need both yarn
and node
.
To install the project dependencies, from the main repo run:
yarn install
You can run the development server by running:
cd demo
yarn start
License
This project is MIT licensed