It started with basketball statistics. Somehow, an old MacBook Air ended up with another job.

I'm an Olympiacos supporter.

I'm also a data engineer.

These two things should probably have remained separate.

Instead, at some point, I decided that simply watching basketball wasn't enough. Apparently, I also needed to collect the data, store it, process it, validate it, and build an application around it.

That's how Red Observatory started.

It's an independent, fan-built sports analytics project, beginning with Olympiacos basketball and with ambitions to eventually explore other sports.

What began as an idea for a few statistics and shot charts gradually turned into something more interesting.

A small data platform.

And, as usual with side projects, the most interesting engineering problems weren't necessarily the ones I expected.

I just wanted to explore some basketball statistics

The original idea was fairly simple.

Collect EuroLeague data, store historical games, and build an interface where I could explore player performances, shooting patterns and team statistics.

There are already plenty of websites with basketball statistics.

I wasn't trying to compete with them.

I wanted to understand the data myself, experiment with visualisations, and build something that combined two things I enjoy: basketball and engineering.

The first substantial historical dataset covered Olympiacos's 2023–24 EuroLeague season.

Forty-one games.

Schedules, box scores, player statistics and shooting events.

The repaired archive contains 5,889 recorded shooting events across Olympiacos and its opponents, including 4,897 field-goal attempts.

At that point, it would have been tempting to concentrate entirely on the frontend.

After all, that's the exciting part. Nobody gets particularly enthusiastic about a database table until it produces something interesting on a screen.

But I quickly learned that collecting the data was only the beginning.

Getting data is not the same as understanding it

An API response arriving successfully doesn't guarantee that your database represents the original information correctly.

I discovered that rather dramatically when an early version of my importer managed to confuse Bayern Munich with Barcelona.

The problem wasn't the EuroLeague API.

It was my decision to generate team identifiers from the first three characters of club names.

Both clubs began with FC.

Excellent engineering.

I wrote about that particular adventure in The API Worked. My Team IDs Didn't.

The early integration combined a community-maintained Python library with direct API requests. When I inspected what had actually reached the database, I discovered that parts of the data had not been preserved correctly.

Fixing the identifiers was one problem. Making the broader ingestion process reliable was another.

The system needed to preserve consistent relationships between games, clubs, players and statistics. It needed checks for incomplete data, missing values and mismatched records.

I also wanted updates to be repeatable.

Not a collection of scripts I could run successfully once, forget about, and spend three hours debugging the following month.

That's where the project started becoming less about a dashboard and more about data engineering.

The architecture is deliberately boring

I don't mean that as criticism.

Quite the opposite.

One of my goals was to keep the project inexpensive, understandable and maintainable by one person.

The main technologies are Python, SQLite, FastAPI, React/Vite and Cloudflare.

But there's an important distinction between how I develop the application and how people access it.

The development environment uses Python collectors, a SQLite database, FastAPI and the React frontend.

Production takes a different approach.

The collection pipeline prepares and validates data, then exports static JSON snapshots. These snapshots are published through Cloudflare Pages, where the React frontend reads them directly.

The production website doesn't depend on a public FastAPI server handling requests for every visitor.

That separation matters.

The system can process data, run validations, prepare releases and maintain historical archives without exposing the entire development environment to the internet.

It also means the public application can continue working with its last published dataset even if the machine responsible for collecting updates goes offline.

It's not necessarily how I would design a large commercial sports analytics platform.

But for an independently maintained side project with a limited infrastructure budget, it makes sense.

Less infrastructure to operate.

Fewer things that need to be publicly accessible.

And fewer reasons to receive an unpleasant hosting bill.

The basketball court was its own engineering problem

Eventually, I got to the part I'd originally wanted to build.

Shot charts.

The historical 2023–24 dataset contains 4,897 field-goal attempts from Olympiacos and its opponents.

To explore shooting patterns, I built an SVG basketball court and began mapping shot coordinates onto it.

This sounds straightforward.

Until you realise that the coordinate system used by a source dataset doesn't necessarily match the coordinate system used by your visualisation.

You need to understand the origin, orientation, scale and transformations involved.

And, more importantly, you need to check whether the resulting points are actually where they should be.

Not every statistical record necessarily contains usable spatial coordinates, either. Those attempts still belong in the statistics even when they cannot be plotted on the court.

A beautifully rendered shot chart with incorrectly transformed coordinates is still wrong.

Red Observatory now includes interactive shot charts, heatmaps, box scores, player statistics, comparisons and analytical views such as Four Factors.

Those features are the visible output of the engineering work.

But they're also useful inspection tools.

When you can explore individual games and examine the underlying statistics, you have more opportunities to notice when something doesn't make sense.

The interface isn't a substitute for automated data validation.

It gives that validation a human counterpart.

And then there's Frankie

I should probably introduce Frankie.

Frankie is an old MacBook Air from around 2009.

It has two gigabytes of memory, a Core 2 Duo processor, and absolutely no business being involved in modern software development.

Naturally, it is.

I installed Lubuntu on it and gradually gave it a collection of responsibilities involving backups, monitoring and development services.

For Red Observatory, Frankie runs scheduled collection, transformation, validation and publication jobs.

It also handles the SQLite processing that prepares data for the public snapshots.

There is something satisfying about taking hardware that would otherwise be sitting in a drawer and finding a useful role for it.

But there are limitations.

Frankie isn't powerful. Its resources are finite, its hardware is old, and I don't want the public website depending on whether a seventeen-year-old laptop is having a good day.

That's why the public application lives independently on Cloudflare Pages.

If Frankie goes offline, visitors can continue exploring the last published dataset.

New collection and publication work simply has to resume when Frankie is available again.

I wouldn't recommend this arrangement as a universal production architecture.

But for this project, it creates a useful separation between data preparation and public delivery.

And Frankie appears to have misunderstood the concept of retirement.

The less visible parts matter more than I expected

One thing that side projects teach you is how much work exists between "I built a feature" and "I can keep this running."

There's the data pipeline.

Then validation.

Then the API.

Then frontend state.

Then tests.

Then packaging the data for release.

Then deployment.

Then discovering that something perfectly reasonable on a desktop screen behaves very differently on a phone.

And then doing it all again when new data arrives.

Over time, I've been putting more effort into making these steps repeatable rather than relying on manual intervention.

New data is collected into a separate candidate database and checked before publication.

The checks cover things like fixture identities, club and player relationships, box-score completeness, score consistency and whether shooting statistics reconcile with the recorded game data.

There are also database integrity checks and safeguards against losing previously accepted fixtures.

Once the data passes validation, the pipeline prepares a snapshot, deploys a preview and checks the publication before promoting it to production.

If collection or validation fails, the last accepted dataset remains available.

That doesn't mean the system has perfect recovery from every possible deployment failure. Some interrupted releases still require manual inspection and reconciliation.

But that's an important distinction in itself.

A process being automated doesn't mean every possible failure has been solved.

I'd rather have a reliable dataset from yesterday than publish incomplete data today just because the collection script finished without raising an exception.

The same applies to the frontend.

A feature isn't particularly useful if changing the selected season gives you statistics from one period and a shot chart from another.

The application needs to behave as one coherent system.

That's the kind of detail that becomes more important as a side project grows.

The platform has started growing beyond the original dataset

The first substantial historical archive focused on the 2023–24 EuroLeague season.

But Red Observatory now includes data from both EuroLeague and the Greek Basketball League.

That expansion is interesting because a new competition isn't necessarily just another collection of games.

Different sources can represent fixtures, teams and statistics differently.

Not every competition exposes the same level of detail, either.

For example, the spatial shot analysis currently relies on validated EuroLeague shot-location data, while Greek Basketball League analytics use verified box-score information.

I don't want the interface to imply that every dataset supports every analytical feature.

That would make the platform look more complete than the underlying information actually permits.

And it's exactly the kind of problem that becomes easier to overlook when a side project starts accumulating more features.

Why build this when other statistics websites exist?

Fair question.

If all I wanted was to find out who scored the most points in an Olympiacos game, there are considerably easier ways.

But that was never really the point.

I wanted to work through the entire process.

From collecting raw data, to understanding its structure, to modelling it, validating it, exposing it, and finally making it useful through an interface.

And I wanted to do all of that with a system I could actually operate myself.

That interests me professionally too.

I work in data engineering, but I've increasingly become interested in the architecture surrounding the data: how systems fit together, how information moves between them, how assumptions are validated, and what it takes to keep a service maintainable.

A personal project gives me the freedom to explore those questions without needing a business requirement for every experiment.

It also means I'm responsible for every questionable engineering decision.

Which is educational.

Occasionally painfully so.

It's still a work in progress

Red Observatory isn't a finished platform.

Basketball is the starting point, and there's still plenty to improve: data coverage, additional historical seasons, mobile usability, statistical explanations and the update process.

Longer term, I'd like to explore other Olympiacos sports too, including football, volleyball and water polo.

But I'd rather expand carefully than collect more data simply because an API makes it available.

Every new competition introduces new identifiers, statistical conventions, data gaps and assumptions.

Every new sport introduces even more.

The platform needs to be able to accommodate that complexity without turning into a collection of unrelated scripts.

That's a much more interesting problem than adding another dropdown.

From a dashboard to something maintainable

The biggest change in Red Observatory hasn't been a particular visualisation or feature.

It's been the way I think about the project.

At the beginning, I wanted to display basketball statistics.

Now I think about data lineage, validation, consistency, publication boundaries and the cost of keeping a system running.

The dashboard is still important.

It's why the data exists in the first place.

But the engineering behind it is what makes the dashboard worth using.

And that's probably the main lesson I'll take from the project so far.

Getting data onto a screen is one thing. Building a system that can keep putting trustworthy data onto that screen is another.

Red Observatory is still small, still evolving, and still very much a side project.

But it's become a surprisingly useful place to experiment with data-platform architecture.

And all because I wanted to look at some basketball statistics.

Frankie, meanwhile, has acquired another job.

Sorry, Frankie.

Explore the project: Red Observatory

Other projects and writing: ptzivras.pages.dev

Red Observatory is an independent, unofficial fan-built analytics project and is not affiliated with Olympiacos or EuroLeague.