Hacker News new | ask | show | jobs
by nix_95 863 days ago
First, look for some reliable sources, and check out sports data APIs that have the data you need (points, assists, 3pt shots % etc...depends on the stats you're covering)

Then, create an appropriate database schema to store the basketball stats. You might have tables for players, teams, games, and stats. Ensure the schema allows you to easily filter, sort, and analyze data. Keep it normalized to avoid redundancy.

Set up an ETL (Extract, Transform, Load) process to fetch data from the source (API) and insert it into your SQL database. Python libraries like pandas can help you with data transformation.

Write a script that efficiently retrieves data from the sports data API using API endpoints or SDKs. Utilize SQL INSERT statements or ORM libraries to efficiently insert data into your database tables.

And most importantly, test the import process on a staging environment before deploying it to production. Verify that the data in your SQL database accurately reflects the source data.