Giter VIP home page Giter VIP logo

ppolls2024's Introduction

Analysis of the 2024 USA Presidential Election State Polls

Overview

This project analyzes the 2024 USA Presididential Election polling data, available from https://electoral-vote.com/. To date, there doesn'tm seem to be much in the way of polling data compared to other years.

The ppolls2024 executable will create directories and files as needed on-the-fly. Make sure that the standard Go $HOME/go/bin directory is in the $PATH. Similar advice for Windows users (you would know better than me).

Free advice regarding poll data: Do not bother looking at national poll data. It would make more sense if the national popular vote determined the leader; see https://www.brennancenter.org/our-work/research-reports/national-popular-vote-explained. But, that is not the way the US Presidential elections currently work. I shall say no more on this subject!

Installation

git clone https://github.com/texadactyl/ppolls2024/
cd ppolls2024
go install ./...

The first time you run go install, you will probably be warned to go get other modules. Do that. Then, continue.

go install ./...

Invocation from a terminal window command-line

cd ppolls2024
ppolls2024 -h # Get help.
ppolls2024 -f # Fetch the latest poll data.
ppolls2024 -l # Load the database with the downloaded data.
ppolls2024 -r tx # Get detailed report for Texas. The string "TX" is also acceptable.
ppolls2024 -r ec # Get summary report for all states. The string "EC" is also acceptable.
                 # Note that upshifting of the -r parameter value is performed automatically.
ppolls2024 -r ec -b # Ditto but for only the battleground states per the configuration file.
ppolls2024 -p # Get plots for all states.

Configuration

When ppolls2024 begins execution, its current configuration parameters are displayed. For example the following is a sample display of console messages for ppolls2024 -l:

2024/07/02 09:30:34 GetConfig: ECVAlgorithm: 2
2024/07/02 09:30:34 GetConfig: Battleground states: AZ,GA,MI,NH,NV,PA,VA,WI
2024/07/02 09:30:34 GetConfig: PlotWidth: 10.000000
2024/07/02 09:30:34 GetConfig: PlotHeight: 10.000000
2024/07/02 09:30:34 GetConfig: PollHistoryLimit: 3
2024/07/02 09:30:34 GetConfig: TossupThreshold: 3.010000

The configuration file config.yaml holds the current parameter values and comments as to the meaning of each parameter.
Be cautious when editing!

Fetch Messages

The first time poll data is fetched from the Internet, the following is displayed:
Fetch: No previous poll data.

If the Internet poll data has changed with respect to the local copy, the following is displayed:
Fetch: Internet poll data has changed.

If the the Internet poll data and the local poll data are still the same, the following is displayed:
Fetch: Internet poll data has not changed. Nothing to do.

Licensing

This is NOT commercial software; instead, usage is covered by the GNU General Public License version 3 (2007). In a nutshell, please feel free to use the project and share it as you will but please don'tm sell it. Thank you!

See the LICENSE file for the GNU licensing information.

Feel free to create an issue record for any questions, bugs, or enhancement requests. I'll respond as soon as I can.

Richard Elkins

Dallas, Texas, USA, 3rd Rock, Sol, ...

ppolls2024's People

Contributors

texadactyl avatar

Watchers

Lucian avatar  avatar

ppolls2024's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.