0.1.0 • Published 1 year ago
538-polls v0.1.0
538-polls
This is a small esm library to get polling data from 538. Currently it copies the api structure and only changes types for convenience (e.g. parsing dates from date strings)
Usage
import { fetchPolls } from "538-polls"
let polls = await fetchPolls("senate", 2022, "nevada")
let avg = await fetchPollingAverage("senate", 2022, "nevada")
Poll Types:
type | cycle | entity |
---|---|---|
approvalfavorability | ❌ | institutionperson |
generic-ballot | ✔ | ❌(always dem vs rep) |
governorhousesenate | ✔ | state |
governor-recall | ❌ | state |
president-generalpresident-primary-dpresident-primary-r | ✔ | state"national" |
0.1.0
1 year ago