Skip to main content

Empire State Run Up

Downloads

empire_state_runup.png

ESRU browser

Hello. I wrote an application to analyse the results of the 'Empire State Run Up', 2013 edition, after I ran the race.

Here you will find my code.

If you just want to install it

See the previous section called 'Packaging', and then install it on your virtual environment:

uv build
uv pip install dist/empirestaterunup-2025.1.2-py3-none-any.whl

There are 4 scripts that you can run:

  • esru_numbers
  • esru_outlier
  • esru_browser
  • esru_plot

If you have uvx, you can run any of them like this:

uvx --from EmpireStateRunUp esru_numbers
uvx --from EmpireStateRunUp esru_outlier
uvx --from EmpireStateRunUp esru_browser
uvx --from EmpireStateRunUp esru_plot

If you want to learn more about these programs, please grab a cup of coffe and read the TUTORIAL

If you are a developer

Running the code in developer mode

uv pip install --editable .
uv sync --dev

Modifying the layout without restarting the apps

For example, playing with the 'esru_outlier' application:

. ~/virtualenv/EmpireStateRunUp/bin/activate
pip install textual-dev
# On another terminal: . ~/virtualenv/EmpireStateRunUp/bin/activate && textual console
textual run --dev empirestaterunup.apps:run_outlier 

Packaging

uv build

Installation from PiPy

For your user:

uv pip install EmpireStateRunUp

Country codes

I used the files generated by the ISO-3166-Countries-with-Regional-Codes for the flag lookup, using Regional indicator symbol.

Notes: Data from the 2025 race is full of errors. Whoever entered the data decided than things like not populating the country of origin was correct:

{"name": "Alessandro Manrique", "bib": "377", "age": 20, "country": "US", "locality": "Mexico", "gender": "M", "state": "Wisconsin", "racer_has_finished": true, "split_data": [{"name": "Full Course", "number": 1, "time_ms": 1077000, "distanc    e_m": 320, "time_with_penalties_ms": 1077000, "gun_time_ms": {"timeInMillis": 2769000, "timeUnit": "m"}, "interval_full": true}, {"name": "20th Floor", "number": 2, "time_ms": 209000, "distance_m": 61, "time_with_penalties_ms": 209000, "gun_    time_ms": {"timeInMillis": 1900000, "timeUnit": "m"}, "interval_full": false}, {"name": "65th Floor", "number": 3, "time_ms": 785000, "distance_m": 229, "time_with_penalties_ms": 785000, "gun_time_ms": {"timeInMillis": 2476000, "timeUnit": "    m"}, "interval_full": false}]}

I did not want to spend an long time fixing this, so first extracted all localities with some jq magic:

jq -r '[.locality | ascii_downcase]|.[]' empirestaterunup/results-2025.jsonl|sort -u
albany
albuquerque
alexandria
altamonte
ames
angier
armonk
astoria
athens
aventura
albany
albuquerque
alexandria
altamonte
ames
angier
armonk
astoria
athens
aventura
...

Next, using an AI LLM, I tried to use a reverse lookup of the country 2 letter ISO code with the locality, all in lowercase. Then wrote a small script to "fix" the country from the original dowloaded race results. For ambiguous locations I assumed the country was US, as the majority of racers from 2023-2024 where from this country.

[berkeley]
alpha-2 = "US"

[berlin]
alpha-2 = "DE"

[bethel]
alpha-2 = "US"

[bilbao]
alpha-2 = "ES"

Tutorial

Make sure you check the tutorial. It explains how this project got started, as well showcases features of the applications.

Running in server mode

The applications now support running in web server mode. To enable:

(EmpireStateRunUp) [josevnz@dmaf5 EmpireStateRunUp]$ esru_server --help
usage: esru_server [-h] --application {esru_numbers,esru_outlier,esru_browser} [--port PORT] [--debug] [results ...]

Browse user results

positional arguments:
  results               Race results.

options:
  -h, --help            show this help message and exit
  --application {esru_numbers,esru_outlier,esru_browser}
                        Applications that can run in server mode: ['esru_numbers', 'esru_outlier', 'esru_browser']
  --port PORT           Default port (8000)
  --debug               Enable debug mode
esru_server --application esru_numbers

# Or if you have an external results file:

sru_server --application esru_browser empirestaterunup/results-2023.jsonl

Getting latest race results

I used athlinks-races to parse the race results. This is an example of a scrapping session:

uvx --from athlinks_races athlinks_races_cli --metadata_rpt /home/josevnz/EmpireStateBuildingRunUp/empirestaterunup/metadata-2025.json --athletes_rpt /home/josevnz/EmpireStateBuildingRunUp/empirestaterunup/results-2025.jsonl --format jsonlines --race_url https://www.athlinks.com/event/382111/results/Event/1124263/Results
uvx --from athlinks_races athlinks_races_cli --metadata_rpt /home/josevnz/EmpireStateBuildingRunUp/empirestaterunup/metadata-2024.json --athletes_rpt /home/josevnz/EmpireStateBuildingRunUp/empirestaterunup/results-2024.jsonl --format jsonlines --race_url https://www.athlinks.com/event/382111/results/Event/1093108/Results
uvx --from athlinks_races athlinks_races_cli --metadata_rpt /home/josevnz/EmpireStateBuildingRunUp/empirestaterunup/metadata-2023.json --athletes_rpt /home/josevnz/EmpireStateBuildingRunUp/empirestaterunup/results-2023.jsonl --format jsonlines --race_url https://www.athlinks.com/event/382111/results/Event/1062909/Results

Metadata

Release files for EmpireStateRunUp 2025.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for EmpireStateRunUp 2025.1.5
File Size Uploaded Provenance Actions
empirestaterunup-2025.1.5.tar.gz 33.5 kB Without provenance Details for empirestaterunup-2025.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for EmpireStateRunUp 2025.1.5
File Interpreter ABI Platform Actions
empirestaterunup-2025.1.5-py3-none-any.whl Python 3 none any Details for empirestaterunup-2025.1.5-py3-none-any.whl

Total release size: 68.6 kB

Release files / empirestaterunup-2025.1.5.tar.gz

Download URL empirestaterunup-2025.1.5.tar.gz
Size 33.5 kB
Tags Source
SHA-256 checksum
How to use checksums
53e6fd1071b286b205cee46260f9d29affbad3d98398c60cc713a1d118a16d7b
BLAKE2b-256 checksum
How to use checksums
bbb4a62af219ba29e4a35cb42c276d8a1b33f5755a3279cd3c6b85e94d35a04f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"37","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / empirestaterunup-2025.1.5-py3-none-any.whl

Download URL empirestaterunup-2025.1.5-py3-none-any.whl
Size 35.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a72fcf40732fe3eba50924610defc5846b13497ff052e046d548e9408ce71816
BLAKE2b-256 checksum
How to use checksums
98af05b9827f2812c1c406a180fdc29343b49379a42751a84944a8f95491eecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"37","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for EmpireStateRunUp 2025.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2025.1.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page