In January 2017, days after President Trump moved into the White House, Justin Connelly was at his home in Anacortes, Wash., bemoaning the fate of scientists.

In speeches, the president called global warming a hoax. He vowed to disband the Environmental Protection Agency and withdraw from the Paris climate agreement. Worse, Mr. Connelly feared the Trump administration would purge climate information from government databases.

He wondered: Would scientists resort to using chisels and stone to preserve their findings? Or, perhaps, stitch them into tapestries?

Mr. Connelly’s friend Emily McNeill worked in a knitting store. The two decided (along with Mr. Connelly’s then wife, Marissa) to assemble a kit of colored yarns that knitters could use to create scarves that documented local temperature changes all year.