0.1.0 • Published 1 year ago

538-polls v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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:

typecycleentity
approvalfavorabilityinstitutionperson
generic-ballot(always dem vs rep)
governorhousesenatestate
governor-recallstate
president-generalpresident-primary-dpresident-primary-rstate"national"
0.1.0

1 year ago