A New York Times analysis found that 97 lawmakers or their family members bought or sold financial assets over a three-year span in industries that could be affected by their legislative committee work.