This is one of those flowers that reward a close look. The flowers are like tiny marigolds, and indeed they’re sometimes called bur-marigolds, although that name is more commonly used for other members of the genus Bidens. The seeds, long and narrow like marigold seeds, have hooks that stick in animal fur or people’s clothes.
If we look closely at the base of the flower head in the picture below, we can see an ant tending its aphid farm.
Gray describes the genus and the species:
BIDENS L. BUR-MARIGOLD. Heads many-flowered; the rays when present 3–8, neutral. involucres double, the outer commonly large and foliaceous. Receptacle flattish; chaff deciduous with the fruit. Achenes flattened parallel to the bracts of the involucre, or slender and 4-sided (rarely terete), crowned with awns or short teeth (these rarely naked).—Annual or perennial herbs, with opposite various leaves ,and mostly yellow flowers. (Laten, bidens, two-toothed.)
B. bipinnata L. (SPANISH NEEDLES.) Smooth annual, branched; leaves 1-3-pinnately parted, petioled; leaflets ovate-lanceolate, mostly wedge-shaped at the base; heads small, on slender peduncles; outer involucre of linear bracts equaling the short pale yellow rays; achenes 4-grooved, nearly smooth, 3-4-awned, very unequal. Damp soil, R. I., westw. and southw.; occasional on ballast northw.