 So let's take a look at an example of fitting data to create a stage discharge curve. And the purpose of doing this is to create an equation of the form Q is equal to A, D to the B. A relationship between our discharge Q in terms of flow and our stage D, which is the height of the water at a particular location that we're concerned about the flow. And the values we're looking for, this value A and the value B, are particular values that we're going to treat as constant for whatever stage, for whatever cross-sectional area that we are measuring the stage at. So if I'm measuring the stage using some sort of height meter here, we're interested in how much flow is associated with a particular depth of water. So in order to do this, we need to have gathered some data, either gathered some data about the cross-section and done some calculations using something like Manning's equation, or there are other ways that we can go ahead and measure the flow rate using something like Weir's. Okay, where a Weir is some sort of small dam with a notch in it over which a particular amount of water is allowed to flow, and there are calculations that determine exactly how much water flowing through based on the height. But if we've used some measurement technique and we've gathered relationships between D and Q, we might, for example, have them plotted in a spreadsheet. Here, for example, is a version of we have some data value here, depths, and in this case, these are going to be depths in feet. And we have a flow rate Q in feet cubed, cubic feet per second. And what we'd like to do is be able to define some relationship between these two things. Now, one of the first things I can do if I'm interested in seeing the relationship is perhaps to plot the data. Okay, and I can do that by using a scatter chart. Here in Google Sheets, there's an example of a scatter chart. And I'm going to go ahead and let's go ahead and insert that there. All right, and notice these are actually not quite labeled correctly here. We'll see that the D is actually here on this axis. We should have D cubed so I can edit the axis labels. Oops, no. All right, so in this case, it hasn't quite given the right labels. And notice in this case, we have D, our depth is across the horizontal axis, and across our vertical axis is our flow rate Q in feet cubed per second. Notice there's a slight upward curvature here. It's relatively small, but we're actually interested to see how it's definitely not a straight line. If I try to do a straight line, I'm going to lose some of the early part of the curve here. So I'm interested in seeing whether or not we can have a little bit more detailed relationship here and come up with a function in the form of the Q equals A D to the B. And the best way to go about doing that, the way we're going to go about doing that is we're going to create two new columns of data. The first column, we're going to put the logarithm of D. And in the second column, we're going to put the logarithm of Q. In other words, we're going to take both of these values and calculate the logarithm in base 10. Again, we could do it in any type of logarithm here, but we're going to do the logarithm in base 10 of each of these values. Now this was typically done in the past by plotting these values on logarithmic paper, log, log paper. You could plot the values and they would fall out in the straight line. In this case, we're going to do it by calculating the values and then plotting those values themselves. So to do so, I have to put in some formulas. In this first cell D2, I'm going to put equals. I'm going to type in LOG, which is the formula for the logarithm. And in fact, I should probably put log, let's do log 10 here since we'll do the logarithm to base 10. And then we'll click on this first value, which is an A2 for the depth. And that'll create for me a log base 10. I believe the default is actually base 10 anyway, but I'm going to go ahead and click that. And if I do so, I want to input that same thing. I can do that by clicking on the corner of my spreadsheet cell, dragging it down. And now all these values in the column are corresponding with the logarithms of all these values here. So we're going to do a similar thing for the logarithms of my flow. Equals log 10, logarithm base 10 of the flow rate. Close my parentheses, and now I have a number representing that logarithm. Now these numbers don't have a lot of physical meaning. The logarithm of feet cubed per second doesn't really have an easily discernible physical meaning. However, what we're really looking for is the pattern here. So I'm going to go ahead, select this data here again, and insert once again a chart. The chart type we like is a scatter plot. Okay, and you'll see we now have a fairly linear relationship between these data points. I'm also going to use a particular feature, the spreadsheets, that makes this a little bit easy. I'm going to go to the customization feature here, and I'm again using Google Sheets. It's slightly different in Excel and in other spreadsheets. But in Google Sheets, the customization I can scroll all the way down until I reach the button that says trend line. And here I'm going to use a linear trend line. I'm going to assume there's a linear relationship, and you see we get a very nice line there that seems to go through all the data points. And I'm going to use, this is a label, I'm going to use the equation as the label for my data there. And I can go ahead and insert that chart. Okay, the main reason for the graph is to first of all verify that we do appear to have a linear relationship. And then the second thing, the most important thing is to actually get this equation here. So I need to record this equation, y equals 1.554x times x plus 1.133. Because the coefficients there are the pieces that I find important. So I'm going to go ahead and write that information here, y equals 1.554x plus 1.133. Now, if you recall, the y, what we plotted on the y-axis was the logarithm of q. And what we plotted on the x-axis was the logarithm of d. So what we really have in this particular case is the logarithm of q is equal to 1.554 times the logarithm of d plus 1.133. And we have two values here that represent this relationship that we've seen. Well, if we recall that relationship, if we take this stage discharge relationship and we take the logarithm of both sides, we get a relationship that looks like logarithm of q is equal to b logarithm of d plus logarithm of a. Well, we have the logarithm of q, we have the logarithm of d in equation, but here's the two pieces of information that are useful now. We have a value for b, an exponent, and we have a value for the logarithm of a. So we're recognizing here that b is equal to 1.554 and that is an exponent. It doesn't have any units. And actually, 1.554 is approximately here, 14 over 9. It's very close to 14 over 9. I believe 14 over 9 is 1.5555 repeating. So we could either treat it as 1.554 or you can recognize that it's an exponent that does a more of a rational number there. And then I can also recognize that the logarithm of a is equal to 1.133. Well, if I want to invert the logarithm base 10 function, I can do so by taking both of these to the 10th power. So I recognize that a is 10 to the 1.133 power. And that is equal to, if I do that on a calculator, 13.58. Question is what units might those be in? Well, those units are going to be a little bit strange here because those units, to some degree, depend upon the discharge units that we have here. But let's go ahead and plug those into our original equation because we now have a and b. I have a relationship that says q is equal to 13.58 units are yet not quite established times d to the 14 over 9. And in this case, we have to go back and recognize what our d and our q were in the first place. In this case, our d was measured in feet and our q was measured in feet cubed per second. So we could find some sort of units here for this value. They're going to be some sort of dependency per second. It looks like it's going to be feet to the 15 over, to the 13 over 9. Feet to the 13 over 9 per second. That would be what units were necessary to balance this because 13 plus 14 is 27, 27 over 9 gives you feet cubed. But again, the units aren't necessarily important. What is important that you remember that this equation only works as long as we're measuring discharge in feet, I mean measuring stage in feet and discharge in feet cubed per second. But here's why this is useful now. Let's say that we wanted to either interpolate or extrapolate. At some point, we actually have a depth, a stage in feet that we actually didn't know what the flow was. We have them for values 0.5, 1, 1.5, etc. At least that was what our data gave us. But let's say, for example, we were interested in the flow at a depth of 1.8 feet. Well, what we would do in that case is we would go ahead and plug in our depth into there. And we'd have to say depth to the 14 over 9. I'm going to go back to my spreadsheet and calculate that pretty quickly here. Equals 1.8 to the 14 divided by 9 power. We get a value of 2.495, and then we multiply that times our 13.58, and we get 33.88 feet cubed per second. So there is the discharge that would correspond with a particular gauge. So once you've established this equation, it is a pretty solid estimate for the flow given a particular stage.