Difference between two slopes I have a dataset with yearly levels of corruption in a number of countries, as well as whether they changed their government that year.
year, corruption, change of president
2001, 5, 0
2002, 7, 1
2003, 8, 0
etc.

I want to test whether corruption is affected by a change in power (defined as the election of a new president who isn't part of the same political party as the previous one).
The idea is to either look at the slope of corruption/year for the two years leading into the election, and the two years after, e.g. $t-2$, $t-1$ and $t$ for the before slope.
The other idea is to look at the average level of corruption three years before and after.
The rate might make more sense since there are more things that affect corruption and different countries may be on different trajectories. However, there could also be some benefit to just looking at average levels three years before and after.
Any thoughts on which one I should look at, and also how to go about measuring this?
 A: From the comments it sounds like you're asking a confirmatory data analysis question when you should still be doing exploratory data analysis.
It might be a good idea to plot your data to see if you can spot any patterns, both when there has been a change of power and when there hasn't been. That would probably give you some certainty about whether corruption levels tend to remain stable or to change when there hasn't been a change of power, and how many years before and after changes you should include in your numerical analysis.
There are also all kinds of interesting questions that exploratory data analysis might surface. Maybe you could see if there are any other variables you should be looking at, such as geographic region (North America, South America, Africa, Western Europe, Eastern Europe etc.), or type of regime, or other variables you could think of.
A: "Any thoughts on which one I should look at, and also how to go about measuring this?"
Which one:  since you are no doubt working in virgin territory, you would do well to explore both methods.
How to measure (I take it you mean both corruption and change in power):  this is clearly a domain-specific political science question rather than one likely to be answered on this site.  If I had to guess I'd say Gary King at Harvard or Jasjeet Sekhon at Berkeley would probably have written something (and something brilliant) on this.
