reports.jl: remove dict restriction

Sometimes solutions are OrderedDicts instead.
This commit is contained in:
2020-09-18 15:44:51 -05:00
parent bebeb4876c
commit 0f60b847dd

View File

@@ -5,7 +5,7 @@
using DataFrames using DataFrames
using CSV using CSV
function plants_report(solution::Dict)::DataFrame function plants_report(solution)::DataFrame
df = DataFrame() df = DataFrame()
df."plant type" = String[] df."plant type" = String[]
df."location name" = String[] df."location name" = String[]
@@ -64,7 +64,7 @@ function plants_report(solution::Dict)::DataFrame
return df return df
end end
function plant_outputs_report(solution::Dict)::DataFrame function plant_outputs_report(solution)::DataFrame
df = DataFrame() df = DataFrame()
df."plant type" = String[] df."plant type" = String[]
df."location name" = String[] df."location name" = String[]
@@ -119,7 +119,7 @@ function plant_outputs_report(solution::Dict)::DataFrame
end end
function plant_emissions_report(solution::Dict)::DataFrame function plant_emissions_report(solution)::DataFrame
df = DataFrame() df = DataFrame()
df."plant type" = String[] df."plant type" = String[]
df."location name" = String[] df."location name" = String[]
@@ -146,7 +146,7 @@ function plant_emissions_report(solution::Dict)::DataFrame
end end
function transportation_report(solution::Dict)::DataFrame function transportation_report(solution)::DataFrame
df = DataFrame() df = DataFrame()
df."source type" = String[] df."source type" = String[]
df."source location name" = String[] df."source location name" = String[]
@@ -198,7 +198,7 @@ function transportation_report(solution::Dict)::DataFrame
end end
function transportation_emissions_report(solution::Dict)::DataFrame function transportation_emissions_report(solution)::DataFrame
df = DataFrame() df = DataFrame()
df."source type" = String[] df."source type" = String[]
df."source location name" = String[] df."source location name" = String[]