Skip to content

Commit

Permalink
Remove hard coded file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
HelixSpiral committed Mar 4, 2018
1 parent f5b32f1 commit b06b08f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
38 changes: 19 additions & 19 deletions Output/SampleData.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Power data for file: SampleData.csv
Power data for file: D:\Github\PowerCalculations\Input\SampleData.csv
Total kWh usage: 359.690
Average daily kWh: 10.900
Average hourly kWh: 0.454
Lowest daily kWh: 7.746 on 02/12/2018
Highest daily kWh: 20.761 on 01/21/2018
Hour: 05:00:00 AM | Usage: 0.430, Highest: 1.581 | Lowest: 0.058
Hour: 08:00:00 AM | Usage: 0.283, Highest: 0.912 | Lowest: 0.054
Hour: 09:00:00 AM | Usage: 0.391, Highest: 2.554 | Lowest: 0.061
Hour: 01:00:00 PM | Usage: 0.417, Highest: 3.200 | Lowest: 0.058
Hour: 03:00:00 PM | Usage: 0.461, Highest: 3.218 | Lowest: 0.083
Hour: 06:00:00 PM | Usage: 0.678, Highest: 3.998 | Lowest: 0.313
Hour: 09:00:00 PM | Usage: 0.469, Highest: 1.317 | Lowest: 0.182
Hour: 11:00:00 PM | Usage: 0.290, Highest: 1.011 | Lowest: 0.060
Hour: 04:00:00 AM | Usage: 0.239, Highest: 0.991 | Lowest: 0.063
Hour: 12:00:00 PM | Usage: 0.567, Highest: 2.389 | Lowest: 0.069
Hour: 02:00:00 PM | Usage: 0.379, Highest: 1.911 | Lowest: 0.051
Hour: 04:00:00 PM | Usage: 0.357, Highest: 1.082 | Lowest: 0.072
Hour: 05:00:00 PM | Usage: 0.680, Highest: 2.455 | Lowest: 0.351
Hour: 08:00:00 PM | Usage: 0.579, Highest: 2.385 | Lowest: 0.314
Hour: 12:00:00 AM | Usage: 0.214, Highest: 0.377 | Lowest: 0.055
Hour: 01:00:00 AM | Usage: 0.239, Highest: 1.352 | Lowest: 0.051
Hour: 02:00:00 AM | Usage: 0.193, Highest: 0.426 | Lowest: 0.051
Hour: 11:00:00 AM | Usage: 0.477, Highest: 2.908 | Lowest: 0.072
Hour: 12:00:00 PM | Usage: 0.567, Highest: 2.389 | Lowest: 0.069
Hour: 01:00:00 PM | Usage: 0.417, Highest: 3.200 | Lowest: 0.058
Hour: 02:00:00 PM | Usage: 0.379, Highest: 1.911 | Lowest: 0.051
Hour: 07:00:00 PM | Usage: 0.739, Highest: 3.272 | Lowest: 0.279
Hour: 09:00:00 PM | Usage: 0.469, Highest: 1.317 | Lowest: 0.182
Hour: 09:00:00 AM | Usage: 0.391, Highest: 2.554 | Lowest: 0.061
Hour: 10:00:00 AM | Usage: 0.538, Highest: 3.160 | Lowest: 0.118
Hour: 06:00:00 PM | Usage: 0.678, Highest: 3.998 | Lowest: 0.313
Hour: 05:00:00 PM | Usage: 0.680, Highest: 2.455 | Lowest: 0.351
Hour: 10:00:00 PM | Usage: 0.587, Highest: 1.544 | Lowest: 0.054
Hour: 11:00:00 PM | Usage: 0.290, Highest: 1.011 | Lowest: 0.060
Hour: 05:00:00 AM | Usage: 0.430, Highest: 1.581 | Lowest: 0.058
Hour: 02:00:00 AM | Usage: 0.193, Highest: 0.426 | Lowest: 0.051
Hour: 03:00:00 AM | Usage: 0.220, Highest: 0.790 | Lowest: 0.055
Hour: 06:00:00 AM | Usage: 0.715, Highest: 1.587 | Lowest: 0.174
Hour: 07:00:00 AM | Usage: 0.759, Highest: 2.075 | Lowest: 0.124
Hour: 08:00:00 AM | Usage: 0.283, Highest: 0.912 | Lowest: 0.054
Hour: 03:00:00 PM | Usage: 0.461, Highest: 3.218 | Lowest: 0.083
Hour: 12:00:00 AM | Usage: 0.214, Highest: 0.377 | Lowest: 0.055
Hour: 03:00:00 AM | Usage: 0.220, Highest: 0.790 | Lowest: 0.055
Hour: 04:00:00 AM | Usage: 0.239, Highest: 0.991 | Lowest: 0.063
Hour: 08:00:00 PM | Usage: 0.579, Highest: 2.385 | Lowest: 0.314
Hour: 10:00:00 AM | Usage: 0.538, Highest: 3.160 | Lowest: 0.118
Hour: 07:00:00 PM | Usage: 0.739, Highest: 3.272 | Lowest: 0.279
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"regexp" // Needed for regexs
"sync" // Needed for WaitGroups
"time" // Needed for time.Time
//"os"
"path/filepath"
)

// Populated from the csv files
Expand Down Expand Up @@ -42,7 +44,8 @@ func main() {
var outputInfo []PowerDataReturn

// Folder for input files
inputFolder := "D:\\GitHub\\PowerCalculations\\Input"
dir, _ := filepath.Abs("./")
inputFolder := fmt.Sprintf("%s\\\\Input", dir)

// Get all the files we want to take input from
inputFiles = returnInputFiles(inputFolder)
Expand Down

0 comments on commit b06b08f

Please sign in to comment.