The contest was shaped by local concerns, like data centers, but also nationwide feelings about Trump and his agenda.