Last month, Jimmy Carter announced that he had cancer and that it had spread to his liver and brain. As his doctors bring a full-court press of medical interventions — including chemo, surgery, and radiation — political commentators are rushing to fill in the 90-year-old former president's legacy.

Carter gets a very bad rap, particularly from libertarians and conservatives, but it's not entirely clear why. It has something to do with “malaise” and lack of “leadership.” And the Carter administration surely had its blunders, particularly on foreign policy.

Some of his mistakes (in retrospect, at least), include the failed mission to rescue American diplomats held hostage in Tehran, which ended with nine people dead, and secretly arming Islamist mujaheddin in Afghanistan in order to draw the Soviets into a Vietnam-style bloodbath. After the Russian invasion, Carter also reimposed draft registration, a costly and foolish policy that persists to this day. His administration also continued arming the Indonesian military in its brutal and deadly occupation of East Timor.

But Carter also oversaw major (and under-appreciated) foreign policy successes, such as the SALT II nuclear weapons reductions, the Camp David Accords ending the Egypt-Israel conflict, and the removal of US nuclear weapons from Korea.

Domestically, Carter was faced with a stagnant economy, oil and gas shortages (caused by Nixon’s price controls), and double-digit inflation (caused by the energy crisis, Nixon’s abandoning the gold standard, and easy money from the Fed).

To fight stagflation, Carter appointed tight-money advocate Paul Volker to head the Federal Reserve Board, and Volker pulled the brakes on inflationary monetary policy — hard. It solved inflation but sent the economy into a painful correction that probably cost Carter reelection.

And despite his personal big government sympathies, Carter's most lasting legacy is as the Great Deregulator. Carter deregulated oil, trucking, railroads, airlines, and beer. (H/t Caleb Brown.)

At the Atlantic, Derek Thompson chronicles the dramatic and almost unnoticed impact of Carter’s airline deregulation over the last thirty years. The bottom line: per-mile ticket prices fell by over fifty percent. And the results have transformed American social life and travel:

-- In 1965, no more than 20 percent of Americans had ever flown in an airplane. By 2000, 50 percent of the country took at least one round-trip flight a year. The average was two round-trip tickets.

-- The number of air passengers tripled between the 1970s and 2011.

-- In 1974, it was illegal for an airline to charge less than $1,442 in inflation-adjusted dollars for a flight between New York City and Los Angeles. On Kayak, just now, I found one for $278.

The impact of beer deregulation has been similarly overlooked: In 1978, the USA had just 44 domestic breweries. After deregulation, creativity and innovation flourished in the above-ground economy. Today, there are 1,400 American breweries. And home brewing for personal consumption is also now legal.

As for civil liberties, Carter also signed the most significant reform of government surveillance powers since World War II in the original FISA Act, and in 1979, he called for the decriminalization of marijuana, well ahead of the cultural and political curve. His legacy is also significant for what he did not do: he did not start any wars.

So why do people hate Carter so much? Gene Healy suggests that it’s a case of perception over reality:

Carter-bashers seem obsessed with style over substance: that Mr. Rogers sweater, the “malaise” speech, Carter’s sanctimonious, unlovable public persona — the way he seemed to personify national decline.

People want the illusion of control: a comforting, competent father-protector at the helm of our national destiny — and Carter couldn’t fake that role as well as most presidents before or since.

Liberals downgrade the Carter presidency as one short on transformative visions: It brought no New Deals, no New Frontiers.

Instead, at its best, the Carter legacy was one of workaday reforms that made significant improvements in American life: cheaper travel and cheaper goods for the middle class.

Ironically enough, the president you’d never want to have a beer with brought you better beer — and much else besides.

So here’s to Jimmy Carter, the president who actually did the thankless job of restraining and reforming government.

Bonus: Peter Van Doren explains Carter's record on deregulation on Cato's podcast.