About trends.tf

trends.tf was born out of my desire to know all the useless stats about my gameplay. I wrote the initial version in two weeks in November, 2020. I was very focused, since I was going to start a new job and I wouldn't have as much free time. The initial version just had the overview, logs, peers, weapons, and trends tabs on the player page. At first I used SQLite, which was great for getting started quickly, but I've since moved on to PostgreSQL. The rest of the stack has stayed mostly the same: nginx, uWSGI, and flask. Development continues in my free time, when I feel like it.

Infrequently-asked questions

How often does trends.tf update?

trends.tf imports new data from logs.tf, demos.tf, ETF2L.org, and RGL every five minutes. Steam names and avatars are updated constantly, but it can take several hours to refresh them for all players. The leaderboard is updated daily. Most pages are cached for up to 30 seconds, although this can be extended if there is no new data.

Why don't the stats on trends.tf match logs.tf?

Many servers upload logs in the middle of the game. So if you check trends.tf right after your game ends, the mid-game logs will still be there. trends.tf also does some post-processing to clean up the data.

Why doesn't the linked log on the trends page match the data?

The graphs on the trends page show a rolling average of the past few logs (20 by default). You can lower the window size, but it may make the graph noisier.

How do I have over 100% accuracy?

Accuracy is shots fired divided by shots hit. If you use a weapon with afterburn or bleed, one shot can result in multiple ticks of damage.

How do I filter by map type?

The map filter matches any part of the map name. So filtering by "cp_" would match all control-point maps. You can also use this to filter by all versions of a map. As an example, searching for "product" will match "koth_product_rcx" and "koth_product_final".

What are the conditions for linking a match?

A log is linked to a match if all of the following conditions are fulfilled:

What are the conditions for linking a demo?

A demo is linked to a log if all of the following conditions are fullfilled:

The strict upload time requirements are because there are often no distinguishing differences other than upload time between two demos that are consistent between the log and the demo. Kills, deaths, and assists often differ because logs.tf excludes kills in humiliation time. Duration often differs for the same reason. The scoreline may differ if there is a stalemate or tie. Other distinguishing features, such as the title, map, and players, are often identical for halves played back-to-back. This leaves upload time as the only remaining identifying feature.

How do I contribute?

trends.tf is open source. The best way to help out is to contribute code. I would also appreciate help from web designers or data analysts to improve the presentation. If you don't have programming prowess, you can help by submitting feature requests and bug reports. I try to prioritize features with community interest (no promises).

Does trends.tf have an API?

trends.tf has a very small API at the moment. It is mostly used for site features such as autocompletion. If you would like to see a more extensive API, send me a pull request, or comment on the issue.