- Have you struggled to add type curves to visualizations?
- Would you like to add lines to a plot and be able to change the format?
- Have you tried to use Line from Column Values before and gotten a jumbled mess?
This is the last part of a 5 part series on Lines & Curves. I will conclude the series with Line from Column Values, which will by far be the longest of the posts, as it requires attention to detail to explain thoroughly. I will start by explaining how to add Line from Column Values in terms of what needs to be selected in the dialog. Then I will show the first mistake I made with Line from Column Values, which is the platform for breaking down how the function works. Next we’ll discuss how to use Line from Column Values to add type curves to a visualization, and I’ll conclude with a discussion on how to use Relations to get even more of Line from Column Values.
The steps to add Line from Column Values include:
- Right click on the visualization, select Properties
- Go to the Lines & Curves menu, click the Add drop down and select Line from Column Values
- In Data table with line values: Select the data table the line should be added from.
- In X-values column: Specify the values that should be used for the x axis. Generally speaking, this should be in the same format as what is already on the visualization (ex. a production date versus a count of days on production).
- In the Y-values column: Specify the values that should be plotted with the line
- Sorted by column: Specify the order in which the line should be drawn through the points. This is usually X-values column for sorting of the rows. Basically, there is more than one way to draw a line through multiple points, so this option is asking how to draw the line through the markers.
- I recommend giving the curve a custom name.
Now, let’s go to the first mistake I made with Line from Column Values. In my first experience, I had a table of production data (many days, many wells), and I simply wanted to plot the sum of BOE with the sum of oil and gas values but be able to format the BOE line as dashed. I knew my only option to do this was Line from Column Values, but it turn out like this and crashed the application.
I realized I had no idea what the function was doing, so decided to plot something simpler. In this example, I filtered down to only two wells, and I put oil and gas on the y axis and again attempted to add BOE as a dashed line. I did in fact get a dashed line, but as you can see, the line travels the length of the x axis (goes through all the dates) and then it jumps up and travels the length of the x axis again. It does this because it is plotting the BOE for the two wells that I have filtered my data set down to. If I add another well to the data set, you would see it travel the length of the axis and jump again. That’s why my first attempt was a jumbled mess.
Note: This visualization is line by (Column Values), not line by well.
Here is a second example. In this case, I removed sum([Gas]) and left only sum([Oil]). I still have only two wells in the data set and have line by set to Well. Again, you can see that my Line from Column Values is running the length of the x axis and then jumping to plot the BOE line for each well in the data set.
What I learned from this was that with Line from Column values, each point in the filtered data set will be plotted on the visualization. If you have two wells in a data set and two markers for each production month, then that is what will be plotted. Line from Column Values does not aggregate.
Now that we understand how the function works, let’s look at what it takes to plot a type curve on a data set, which is slightly different because your type curve data is probably like mine, which means it’s in a separate table from the production data set. This is my starting point — a line chart with production months on the x axis and cum production/ 1000 ft on the y axis. I have one line for each well.
This is my type curve table. I have producing months, similar to what is on my visualization, along with cumulative production / 1000 ft. Now, what makes this work so easily is that I only have one record per producing months in the table. You can tell this because I have sorted by c.Producing Months. If I had multiple values for each producing month, you would see the same behavior as the first example, where the line traveled the length of the x axis and then jumped back to the start. The line I am about to add will only travel the length of the x axis one time because there is only one value per producing month.
I can easily add a Line from Column Value using these settings
This is the result — production for each well with the type curve overlaid.
Before I close out the post, I want to show one more example where the type curve table has more than one record per producing month. More specifically, the table has 16 type curves, each with 40 months of data, as well as a classification of short or long lateral length. (see table below)
Here is the type curve table
Note that the gas columns are calculated. One is meant for long lateral length and returns null for the short and vice versa. Also note that a single type curve can have records for both long and short lateral length.
Here is the production table (called Wells table). There is a unique identifier for each well and a well name in the table. I have cut it off for spacing considerations.
Here is the starting visualization.
Here are the Lines & Curves adds. The long line will only populate with “long” type curves because the Gross We Gas Long Daily is calculated to return null for all short type curves. Vice versa for short.
There is one other critical step to making this particular example work, and that is adding a relation on the Type Curve between the two tables and configuring the Type Curve table to Include Filtered Wells only.
If this step is skipped, the result will look something like this…where no filtering is applied in the type curve table.
This is the finished result. Note, a filter has been added to a text area, which is connected to the wells table. This allows the user to look at one type curve at a time. Because of the relation, the type curve table is also filtered.
Well that covers it for lines and curves. I hope you found this series useful. Please feel free to leave comments.
Guest Spotfire blogger residing in Whitefish, MT. Working for SM Energy’s Advanced Analytics and Emerging Technology team!