Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Election graph #3

Open
VoxelPrismatic opened this issue Nov 13, 2024 · 1 comment
Open

Election graph #3

VoxelPrismatic opened this issue Nov 13, 2024 · 1 comment

Comments

@VoxelPrismatic
Copy link
Owner

Pull live ballot counts from https://realclearpolitics.com for the purpose of creating a ballot count graph to expose potential fraud, like Wisconsin 2024.
20241113_073355.jpg
20241113_073234.jpg

This way, I can trust these graphs without any reliance on other people, and I will always have a reference to these graphs for any future purpose.

@VoxelPrismatic
Copy link
Owner Author

type ElectionRace struct {
    ID string `gorm:"primaryKey"` // eg 2024-P-IL-GOP
    Year int
    State string
    County string // "District #" if applicable
    Party string // GOP, DEM, WRT, etc
    Race string // President, House, Senate, Governor, Mayor, etc
    Color string // Hex color
}
    
type ElectionSnapshot struct {
    Race string `gorm:"primaryKey"`
    Timestamp int64 `gorm:"primaryKey;autoIncrement=false"` // X-axis
    Called bool // Will darken graph after this point
    BallotCount int // Y-axis
    ReportingPct int // Clarity
}

type (race ElectionRace) Snapshots() []ElectionSnapshot {
    ret := []ElectionSnapshot{}
    db.Where(&ElectionSnapshot{ Race: race.ID }).Order("timestamp ASC"). Find(&ret)
    return ret
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant