Welcome to PLEXOS2BokehPivot! This project converts PLEXOS XML solution files to CSV format and visualizes the data using Bokeh Pivot. Follow these steps to set up, convert, and visualize your data.
- Locate the
setup.bat
file in the root directory. - Double-click
setup.bat
to run it. This script will install the XML to CSV environment necessary for the project. - Place your PLEXOS solution files into the
PlexosSolutions
directory.
- Navigate to the
X2BokehPivot
folder. - Run
setup.bat
to install the Bokeh Pivot environment. - Launch Bokeh Pivot by running
launch.bat
.
-
Prepare Your PLEXOS Solution Files:
- Ensure that all your PLEXOS solution files are placed in the
PlexosSolutions
directory, organized by scenario.
- Ensure that all your PLEXOS solution files are placed in the
-
Check Configuration:
- Open
config.csv
to verify that all parameters are correct.
- Open
-
Run the program
- The output CSV files will be saved in the
runs
directory. - Each scenario will have its own directory within
runs
, containing the processed files.
Note: The script processes LTPlans by default. To switch to STSchedule, update the following lines in the script:
SimulationPhaseEnum.LTPlan
to
SimulationPhaseEnum.STSchedule
- The output CSV files will be saved in the
-
Launch Plexos2BokehPivot Mapping Tool:
- Double-click
setting.bat
to start the tool. - Select "Mapping mode" when prompted.
- Double-click
-
Map Your Columns:
- The tool will list CSV files from the
PlexosOutputs
folder. Choose the file you want to map, such asgeneration.csv
. - Map the columns to the dimensions required by Bokeh Pivot:
- Example Mapping:
- If you have a column named "category_name," map it to
Dim1
. - For fixed values (e.g., a constant region), type
constant
and enter the value. - Select the column for
Val
as the value column.
- If you have a column named "category_name," map it to
- Example Mapping:
- The tool will list CSV files from the
-
Save Your Configuration:
- Enter a name for your mapping configuration to easily identify it later.
- The tool will automatically save your mapping settings in
configuration.json
.
-
Generate Output Files:
- Run the tool again, choosing "Execute mode."
- The tool will generate new CSV files in the
runs
folder, named according to your mapping configuration.
-
Open Bokeh Pivot:
- Navigate to the
X2BokehPivot
directory. - Run
launch.bat
to start Bokeh Pivot. - When the browser opens, the path to the
runs
directory is selected - remove a letter press enter and put the letter back and press enter
- Navigate to the
-
Load and Visualize Your Data:
- Apply the visualization you selected to see your data represented effectively.
- By default the program selects the last year, month and day for hourly data.
- By default the program selects the last year, month for daily data.
- By default the program selects the last year, for monthly data.
Note that data will can only show data correctly if only 1 year, 1 month, 1 day is selcected since the hourly data will be concatnated. Same applies for the daily data, in this case its only 1 year and 1 month. Same aplies to monthly data, only one year at a time unless you 'explode' by year.
- Customize Visualizations:
- To customize the colors of technologies, go to
X2BokehPivot/in/reeds2
and modify thetech_style.csv
file.
- To customize the colors of technologies, go to
-
Prepare Your Files:
- Place your PLEXOS solution files into the
PlexosSolutions
directory.
- Place your PLEXOS solution files into the
-
Run the program:
- Verify configuration in
config.csv
. - Run
lanuch.bat
to generate CSV files
- Verify configuration in
-
Visualize with Bokeh Pivot:
- Start Bokeh Pivot and paste the path to the
runs
directory. - Import the CSV files and apply the desired visualizations.
- Customize the visualizations as needed.
- Start Bokeh Pivot and paste the path to the