emod_api.channelreports.channels module#
Module for reading InsetChart.json channels.
- class emod_api.channelreports.channels.Channel(title: str, units: str, data: List)[source]#
Bases:
object
- property data#
- class emod_api.channelreports.channels.ChannelReport(filename: str | None = None, **kwargs)[source]#
Bases:
object
- write_file(filename: str, indent: int = 0, separators=(',', ':')) None [source]#
Write inset chart to specified text file.
- to_csv(filename: str | Path, channel_names: List[str] | None = None, transpose: bool = False) None [source]#
Write each channel from the report to a row, CSV style, in the given file.
Channel name goes in the first column, channel data goes into subsequent columns.
- Parameters:
filename – string or path specifying destination file
channel_names – optional list of channels (by name) to write to the file
transpose – write channels as columns rather than rows