

These images are meant to be informative of the internal make-up of Congress, but as with any statistical analysis the reduction of the Real World to a few numbers is going to miss out on the complexities of life.
GovTrack first published a political spectrum diagram in 2004. A new methodology has been used since 2011, along with new legislative leadership scores. An explanation of the computation of these two statistics is given below.
Political Spectrum Ideology Scoring
The statistical analysis used to compute ideology is, believe it or not, not based on issue group rating, GovTrack's opinion, or any other editorial source. Instead, it is a numerical statistic computed based on mere patterns of how Members of Congress cosponsor bills. The short of it is that Members of Congress that cosponsor similarly are placed next to each other on the left-right axis. Members of Congress that cosponsor different sets of bills are placed at different ends of the axis.
This statistical process doesn't say what this axis means. It might be liberal-conservative, city-country, or north-south for all it cared. But if you look at the results, and especially the fact that it automagically puts the Dems on one side and the GOP on the other, hopefully you will agree that it is showing something roughly close to ideology.
For the math folks reading, the underlying statistical analysis is called principle components analysis, using singular value decomposition over a term-document matrix. The terms and documents are both Members of Congress, with each cell being the square root of the number of times the Member represented by the column cosponsored a bill sponsored by the Member represented by the row. The political spectrum is taken from the second principle dimension.
Other people (mainly people who know more about this than I do) have done similar analyses. See Analyses of Recent American Politics, Keith T. Poole and Data Mining in Politics, Aleks Jakulin.
Legislative Leadership
The up-down axis for legislative leadership is computed in a similarly editorially-blind manner. As with the political spectrum computation it is based on patterns of cosponsorship. Roughly speaking, each time a Member of Congress cosponsors another Member of Congress's bill, the first Member of Congress gives the second Member of Congress some leadership points . . . in proportion to how many leadership points the first Member of Congress has. It is basically the same way Google ranks pages in their search results.
We can be a little more assured that this analysis actually reflects some aspect of reality. It is in a sense measuring the give-and-take relationships that Members of Congress have with each other, or at least the part of those relationships exposed through bill cosponsorship. One interesting point is that while, at the time of writing, the highest leadership score in the Senate is "correctly" given to the Senate Majority Leader, the Speaker of the House has a relatively low leadership score. This is easily explained by the fact that the Speaker tends not to introduce legislation herself, and it reinforces the fact that reality cannot be boiled down to single statistics.
Again for the math junkies like myself, the method here is literally the Google PageRank algorithm, as described in Numerical Algorithms for Personalized Search in Self-organizing Information Networks by Sep Kamvar. The transition probabilities aij in the Markov matrix are the probabilities that when Member of Congress i cosponsors a bill, that it will be a bill of Member of Congress j. Interestingly, this legislative leadership score is highly correlated with the first principle dimension of the PCA analysis above, giving some insight into what that principle direction can be understood as.