Does pypistats.org only go back a few months? Anyone know if there's a way to get the pypi download stats for a package going back years? Specifically I would like to see how the release of `zoneinfo` in 2020 affected the downloads of `pytz`.
@treyhunner @pganssle It goes back six months. You'll need to use BigQuery to go back further, or something like https://clickpy.clickhouse.com/dashboard/pytz
There's also monthly data at data/pytz-* in https://github.com/hugovk/pypi-tools
Remember line goes up, so you'd have to try and normalise against the "normal" exponential growth.
@hugovk @treyhunner Any advice on a package to normalize against? I feel like setuptools would have worked a while ago but these days it's less and less likely that you will get a copy of that automatically with Python. pip might work, but with uv...
Maybe just need to normalize against Python downloads, assuming the ratio between downloads and package installs is roughly constant.
@hugovk @treyhunner Though also I suspect that this whole line of thinking doesn't really answer my original question that well, which is, "How relevant is pytz today?" When I first gave my time zones talk it was the dominant package and I could say, "Don't directly attach pytz zones to your datetimes" and 5 people would run off to fix production bugs.
These days there are more pytz downloads than ever but I think a big part of that is that it is still a dependency of pandas and cryptography, which might not mean anything about whether most programs today actually use pytz directly.
@pganssle "PyPI Stats retains data for 180 days." from https://pypistats.org/about
@pganssle You should be able to use https://github.com/ofek/pypinfo to fetch data on longer time horizons.
@pganssle The easiest is to query the linehaul data from bigquery directly
```
SELECT
DATE_TRUNC(DATE(timestamp), DAY) AS day,
COUNT(*) AS num_downloads
FROM
`bigquery-public-data.pypi.file_downloads`
WHERE
file.project = 'pytz'
GROUP BY day
ORDER BY day
```
@pganssle I think @hugovk might know the answer