Catalog npm
Back to packageRELEASE DETAILS

0.1.0

npm

538-polls

Fetch polling data from 538

electionpoll
Published4 Mar 2024
Direct dependencies2
Transitive dependenciesNot calculated

README

Current package documentation

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
approval
favorability
❌institution
person
generic-ballot✔❌
(always dem vs rep)
governor
house
senate
✔state
governor-recall❌state
president-general
president-primary-d
president-primary-r
✔state
"national"

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^20.11.20development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.3.3development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-P8DZLuEf+N6EyboX9GCsN82j6BtGGCGcarja+snOjC5pEmRF5HfEBFhXfXVLKEOfVH5okb9rJ4w+QbC8B2y7Xw==",
  "shasum": "5c73094ac3200f188fafb836ad1fbb934c9a0796",
  "tarball": "https://registry.npmjs.org/538-polls/-/538-polls-0.1.0.tgz",
  "fileCount": 18,
  "unpackedSize": 20893,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDGzAaPKXmc0UbQ2DCc9LVrqqHONsbrLK0eKbFGPDyixgIgAzqQBVFCQ047N6eU/D2lBJfLI2raTAbe6g0A4rp3k3s="
    }
  ]
}

Repository

PENDING
mola19/538-polls

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:25 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:5939aa91b259a379e8ea1c2bdd1a678b49daeba937c14b60b8a7a147e06a1a6b

Other collected versions

View all collected versions →