Populating Timestream With Scraped Predictit Market Ticks 2

Posted on Thu 26 October 2023 in Election Modeling • Tagged with Python, Timestream, AWS Lambda, EventBridge

In the last section, we explored scraping predictit.com market data and storing results in a Timestream database. We implemented code to perform a single capture of market data. For our time-series dataset. A market capture accounts for a single point in the data dimension, but true time-series data must …


Continue reading

Populating Timestream With Scraped Predictit Market Ticks 1

Posted on Wed 04 October 2023 in Election Modeling • Tagged with Python, Timestream

Amazon Timestream is a fully managed time series database. It's a relatively new offering to the AWS serverless portfolio. Main Timestream use case is to store IoT device-generated time series data, but our goal is to eventually build a notification and monitoring system based on prediction market tick data that …


Continue reading

AWS Hosted Pelican Site 2

Posted on Fri 30 June 2023 in AWS host Pelican • Tagged with Python, S3, CodeCommit, CloudWatch, CodeBuild, CodePipeline, Pelican

In part 1 we set up and deployed a static website generated with Pelican, a general-purpose framework that enables rapid generation of static websites. Content is written in markdown (.md), and Pelican generates the corresponding HTML, JSON, and CSS files. Now that we have this Pelican site set up and …


Continue reading

AWS Hosted Pelican Site 1

Posted on Mon 26 June 2023 in AWS host Pelican • Tagged with Python, S3, CloudFront, Route 53, AWS Certificate Manager, Pelican

There's plenty of tutorials describing how to set up a dev blog using Pelican, a static site generator, so we're not going to waste time re-creating the wheel here, but I will share the process I followed to set up this pelican site in AWS. In this section, we're going …


Continue reading

Predicting Election Night Margin 3

Posted on Thu 01 June 2023 in Election Modeling • Tagged with python, mixed effects, elections, S3

The below graphic, on the left, shows how counties report in the 2022 Georgia Senate election. The order of counties reporting tends to skews election results. If liberal counties report early, the phenomenon is sometimes referred to as the right hook. This notoriously happens in Florida, as early results make …


Continue reading

Predicting Election Night Margin 2

Posted on Fri 12 May 2023 in Python, Data Science • Tagged with python, mixed effects, elections, S3

As results come in election night, counties vary widely in representation of democrat vs republican margins. Rural counties tend to heavily favor republicans, while counties in urban areas tend to favor democrats, so depending on which counties are being reported first, early result margins might not represent the true, state-wide …


Continue reading

Predicting Election Night Margin 1

Posted on Thu 12 January 2023 in Python, Data Science • Tagged with python, visualisation, elections, S3

As tallies are reported on election night, there’s a tendency for early results to favor one political party over the other. At a county level, this is usually due to the way ballots are counted. Below is usually the order in which ballots are counted

  1. Mail-in
  2. early in-person
  3. Election …

Continue reading

Automate Election Night Returns Scraping With AWS Lambda

Posted on Sun 26 June 2022 in Election Modeling • Tagged with Python, AWS Lambda, S3, EventBridge, CloudWatch

To build our ‘Election Margin Projection Model’, we need to capture election night vote counts. Unfortunately, most archives of election results only record final vote tallies, but we need vote count as a time series during the tally process throughout election night(or election weeks as has been the custom …


Continue reading