See here.
Have NPTRS reduced polarization?
The Shor-McCarty data include two measures of polarization. One is the familiar distance between the median Democrat and median Republican in each state-legislative chamber. Another is the average of all pairwise differences in a given chamber.