Turning Numbers Into Something You Can Actually See: A Major Update to My Odometer App

Some numbers are so large that they become almost meaningless.
A government spending £200 billion a year, a national debt measured in trillions, hundreds of thousands of people migrating in or out of a country, or billions of pounds being spent on healthcare are all perfectly valid statistics — but they are difficult to comprehend when presented as a number in a report.
That was the original reason I built my Odometer app.
Instead of simply saying that something costs £100 billion a year, the app turns that annual figure into a live counter, showing the number increasing second by second.
Over the last few days I’ve substantially rebuilt and expanded it, and what started as a relatively simple counter has become a much more capable little data visualisation platform.
Making the calculations more accurate
One of the first things I wanted to improve was the calculation itself.
Originally, annual figures were effectively divided by a fixed 365 days. That’s close enough for many purposes, but it isn’t technically correct for every situation.
The application now supports two distinct types of counter.
Period totals are used when a known or estimated amount applies between two particular dates. For example, an NHS expenditure figure for the 2026/27 financial year can be spread precisely between 1 April 2026 and 31 March 2027.
The application calculates the actual length of that period rather than assuming a year always contains a particular number of seconds.
Annual rates are used for things which genuinely represent an ongoing yearly rate. These use the mean Gregorian year of 365.2425 days.
That sounds like a fairly minor change, but it means the underlying mathematics now properly reflects what each figure actually represents.
Showing the total as well as the increase
Another useful improvement was the addition of a starting value.
That allows the app to do more than say:
The US national debt is increasing by approximately $X trillion during this financial year.
It can instead start with the existing debt pile and show the entire value increasing.
For example, an odometer can begin at roughly:
$37.6 trillion
and gradually move towards:
$40+ trillion
during the course of the year.
The same mechanism can be used for council debt, national debt, population or any other statistic where there is both an opening value and a projected change.
The numbers now explain themselves
One of the risks with this kind of application is accidentally entering the wrong number of zeroes.
£2.5 billion and £2.5 trillion look remarkably similar when entered into a database as:
2500000000
and
2500000000000
So the administration interface now includes a Rate Check.
Alongside the raw value, it translates the number into human-readable terms and shows approximately how quickly the counter will move.
A £2.55 trillion annual increase, for example, can be checked as approximately:
£6.99 billion per day
£291 million per hour
£4.85 million per minute
£80,860 per second
It also shows the expected end value when a starting balance has been entered.
That makes it much easier to spot a badly configured odometer before publishing it.
A much better public display
Quite a lot of work has gone into the presentation as well.
The individual odometer page has been simplified so that the statistic itself is the focus. There is more space around the title and counter, the typography is cleaner, and large numbers automatically scale to fit the available screen.
That last point is particularly important on phones.
A value such as:
$40,123,456,789,012
should now remain visible in portrait mode rather than disappearing beyond the edge of the screen.
The title also has a subtle additional feature: hovering over it reveals the description and official source for the statistic without permanently adding more clutter to the page.
On touch and keyboard devices the same information remains accessible.
Comparing several odometers at once
I’ve also added a new Odometer Board.
This allows up to four counters to be displayed simultaneously.
Two can sit side-by-side, four can form a 2×2 dashboard, and when three are selected the user can choose between:
2 above + 1 below
or
1 above + 2 below
On a sufficiently large screen the aim is for the whole dashboard to be visible without scrolling.
The configuration screen generates a shareable URL containing the selected odometers. Opening that URL displays only the counters rather than the configuration controls, making it useful for presentations, displays or simply sharing an interesting comparison.
Archived odometers are clearly identified in the selector and kept separately from current ones, while duplicate selections are prevented.
Better organisation behind the scenes
As the number of odometers increased, maintaining them became almost as important as displaying them.
Each record can now have:
- a category, geography and tags
- an official source name and URL
- source publication and verification dates
- active/inactive status
- current/archived status
- an option to freeze an expired counter at its end value
- a configurable visual theme
- display prefix and suffix such as £, $, kg or km
The administration page now has filters for categories, geography, tags, active/inactive records and archived/current records.
This makes it surprisingly quick to answer questions such as:
Show me all active UK public-finance counters tagged Debt which haven’t been archived.
The public listing page has similar filtering, with archived statistics hidden by default.
Preserving old statistics
I’ve become particularly keen on the idea of keeping historical odometers rather than simply overwriting or deleting them.
An FY2025/26 counter can now be archived and frozen at its final value, while a new FY2026/27 counter takes its place.
Over time that should create an interesting collection of historical snapshots.
A figure that was once a live forecast becomes a record of what was being estimated or reported at that particular point in time.
More meaningful examples
The database has expanded considerably as part of the work.
There are now counters covering areas such as UK and US government debt, government borrowing and interest costs, NHS expenditure, welfare and State Pension expenditure, council finances, UK migration, European budgets, Chinese government expenditure, global population, trade, healthcare and science.
I’ve tried wherever possible to base these on official sources such as the UK Government, Office for Budget Responsibility, Office for National Statistics, NHS organisations, local authorities, the US Treasury, Congressional Budget Office, European institutions and international organisations.
There is also more information stored alongside every counter about where the number came from and when it was last checked.
That’s important because a smoothly ticking counter can otherwise give an impression of precision that the underlying forecast may not deserve.
An odometer based on a projection is still a projection.
Creating social-media graphics
One of my favourite additions is probably the sharing tool.
An odometer can now be turned into a square 1200 × 1200 PNG image containing its title, an example/current value and, optionally, its description, source and a QR code.
The QR code links back to the live odometer.
That means a statistic can be shared as an image on social media while still giving somebody an easy way to reach the live, source-backed version.
The individual pages also include Open Graph and social metadata, allowing links to generate richer previews when supported by the receiving platform.
Making the site easier for search engines to understand
There has also been quite a bit of less-visible work aimed at search engines.
Individual odometers now have proper page titles, descriptions, canonical URLs and structured Schema.org data.
The site also has a dynamically generated XML sitemap.
Rather than relying on the old-fashioned meta keywords tag, the pages expose meaningful descriptions, categories, sources and permanent URLs.
The aim isn’t simply to attract search traffic. It is to make it clear to both people and machines what the statistic represents, where it came from and when it was verified.
Security matters too
Because the application has an administration interface, I also took the opportunity to review its security.
The admin area is protected by Sitelok permissions, while database editing is POST-only and now has dedicated session-based CSRF protection.
User-supplied IDs, URLs and dates are validated, database operations use the appropriate prepared/DataTables mechanisms, output is escaped before being displayed, and security headers have been tightened.
Audit information such as the user creating or modifying a record comes from the authenticated session rather than values submitted by the browser.
There are still areas I can continue improving — there nearly always are — but the application now has a considerably stronger baseline.
A surprisingly useful little project
What I like most about this project is that the underlying idea remains extremely simple.
Take a large number.
Work out how quickly it changes.
Then let people watch it happen.
A figure such as £150 billion is abstract.
Seeing the same amount increasing by thousands of pounds every second somehow makes its scale much easier to appreciate.
The odometers aren’t intended to replace the original statistics, reports or official sources. In fact, every counter is designed to make its source easier to find.
They’re simply another way of looking at the numbers.
And after this latest round of development, I now have a much better platform for creating them.
You can explore the live odometers here:
https://jonathantolhurst.com/apps/odometers-list.php