-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from JeanPoffo/feature/issue-1-2
Improved Create Data Raw and Index Dashboard
- Loading branch information
Showing
7 changed files
with
142 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class ServiceConvertCarbonMonoxide { | ||
readonly BASE_VALUE_CONVERSION = 0.0409; | ||
|
||
readonly MOLECULAR_WEIGHT = 28.01; | ||
|
||
public execute(carbonMonoxide: number): number { | ||
return this.BASE_VALUE_CONVERSION | ||
* carbonMonoxide | ||
* this.MOLECULAR_WEIGHT; | ||
} | ||
} | ||
|
||
export default ServiceConvertCarbonMonoxide; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class ServiceConvertOzone { | ||
readonly BASE_VALUE_CONVERSION = 0.0409; | ||
|
||
readonly MOLECULAR_WEIGHT = 48.00; | ||
|
||
public execute(ozone: number): number { | ||
return this.BASE_VALUE_CONVERSION | ||
* ozone | ||
* this.MOLECULAR_WEIGHT; | ||
} | ||
} | ||
|
||
export default ServiceConvertOzone; |
13 changes: 13 additions & 0 deletions
13
src/service/converters/ServiceConvertParticulateMaterialTwoFive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class ServiceConvertParticulateMaterialTwoFive { | ||
readonly BASE_VALUE_CONVERSION = 0.0409; | ||
|
||
readonly MOLECULAR_WEIGHT = 1; | ||
|
||
public execute(particulateMaterialTwoFive: number): number { | ||
return this.BASE_VALUE_CONVERSION | ||
* particulateMaterialTwoFive | ||
* this.MOLECULAR_WEIGHT; | ||
} | ||
} | ||
|
||
export default ServiceConvertParticulateMaterialTwoFive; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const sumAndDivide = (numbers: number[], divider: number): number => { | ||
const sum = numbers.reduce((total, actual) => Number(total) + Number(actual), 0); | ||
return (sum / divider) ?? 0; | ||
}; | ||
|
||
export { | ||
sumAndDivide, | ||
}; |