Ben Amiot 5 Posted October 11, 2020 Share Posted October 11, 2020 Hi all, I'm trying to create a chart that would visualise the "run vs. change cost" of my domain. I'd like to have them stacked up (either bar or line) based on the next 5 years forecast. The idea is to represent something like that: The chart above was manually created, but how would I go about creating the underlying data in Excel or CSV, then visualisethis in Spotfire I'd like to avoid having to create 12 months x5 years worth of lines in Excel since I will have to maintain that on a regularly basis. Ben Link to comment Share on other sites More sharing options...
Paul Villena Posted October 12, 2020 Share Posted October 12, 2020 Hi Ben, Here is a simple CAPEX, OPEX Model implemented using Python and Spotfire. I am using a csv file to provide the input parameters to our models. It currently has 5 fields: Model Type(CAPEX or OPEX), Line Item- provides the expense description, Amount(this is the per annum amount for OPEX entries and total amount for CAPEX entries), Start Period(first day of the starting month where expense is recognised) End Period(first day of the ending month where expense is recognised) This input file is loaded as a Spotfire data table and will be the input parameter to a Python Data Function (dfin).This is the Python data function that does the cost allocation based on the expense type: The output of this data function (dfout) will be returned as a Spotfire data table that will feed the visualisations. Andthis is a sample visualisation: I have attached the input files and the sample dxp that describes the entire process. Your allocation rules may be different to what I have described here and we may need to tweak the python script to reflect the rules that you want. Link to comment Share on other sites More sharing options...
Ben Amiot 5 Posted October 13, 2020 Author Share Posted October 13, 2020 Thanks Paul! I'll try that and report back. Ben Link to comment Share on other sites More sharing options...
Ben Amiot 5 Posted October 13, 2020 Author Share Posted October 13, 2020 I think I might use your Python script and apply it to D3JS: https://observablehq.com/@d3/stacked-area-chart Ben Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now