Python Program to Process Odds API, Calculate Hit Percentages, and Update Airtable

Job ID: 38962692

Budget: $30 – $250 USD

I need a Python-based program that integrates with the Odds API and Airtable, calculates hit percentages for specific prop types (e.g., assists, points, rebounds, threes), and updates Airtable with the results. This program will run locally on my computer and will be delivered as an executable file .exe for windows.

Key Deliverables:
- A working Python script or executable that:
- Retrieves data from the Odds API (player name, prop category, odds, and line value).
- Filters the data based on a specific odds threshold (-400 to -1200).
- Checks Airtable to avoid duplicate records (player name, prop category, and line value).
- Inserts the data into Airtable if the combination of player, prop, and line doesn't already exist.
- Retrieves totals for the relevant prop category (e.g., assists, points, rebounds, threes) from Airtable.
- Calculates hit percentages for the last 5, 10, 20, and 30 games, along with a weighted average.
- Updates Airtable with calculated hit percentages.
- Executable file that I can run locally without needing Python installed.

Technical Requirements:
Language: Python 3.x
Libraries:
Requests: For API integration with Odds API and Airtable API.
Airtable-python-wrapper: For interaction with Airtable.
Optional: NumPy for more advanced statistics calculations (if needed).
PyInstaller or cx_Freeze: For creating the local executable file.

Steps for the Project:
Fetching Data from the Odds API:

Use the requests library to pull data (player name, prop category, odds, and line value) from the Odds API.
Filter data based on odds within the range -400 to -1200.
Check for Existing Data in Airtable:

Use the Airtable API to check if a record for the player name, prop category, and line value already exists.
If the combination already exists, skip inserting it.
Insert Data into Airtable:

If the combination does not exist, insert the player name, prop category, odds, line value, and relevant totals into Airtable.
Retrieve Totals for Prop Categories:

Based on the prop category (assists, points, rebounds, threes), retrieve the relevant totals (e.g., player_assist_totals_L5, player_points_totals_L5) from Airtable.
Calculate Hit Percentages:

For each retrieved total, calculate the hit percentage for the respective last 5, 10, 20, and 30 games:
Count how many times the total meets or exceeds the line value.
Calculate the percentage of success.
Calculate Weighted Average:

Calculate the weighted average using the formula:
Last 5 games: 15%
Last 10 games: 40%
Last 20 games: 20%
Last 30 games: 25%
Update Airtable with Results:

Update Airtable with the calculated hit percentages for each respective period and the weighted average.
Final Deliverable:

Provide the program as a standalone executable .exe for Windows that I can run locally on my computer.
Related categories: Python Data Processing Software Architecture API