Skip to main content

A Python wrapper for data from the R package survivoR.

Project description

SurvivorPy

SurvivorPy is a Python wrapper of the data from the R package survivoR. It enables Python coders easy access to clean, structured data on contestants, seasons, episodes, votes, and more from the reality show Survivor—directly from Python, using familiar pandas dataframes.

SurvivorPy syncs its data with survivoR on a daily basis, ensuring the data reflects recent updates to the survivoR package.

Installation

You can install SurvivorPy from PyPI:

pip install survivorpy

Usage

There are a couple of different ways to access Survivor data with survivorpy, depending on your preferences and needs. In both cases, the tables are provided as pandas DataFrames.

Import a table directly

If you know the name of the table you want, you can import it directly:

from survivorpy import castaways

castaways.head()

See all available tables

To see what's available, use the TABLE_NAMES constant:

from survivorpy import TABLE_NAMES

print(TABLE_NAMES)
# [..., 'castaways', ...]

Using the load() function

survivorpy provides a load() function which gives an alternative way to access the tables:

import survivorpy as sv

df = sv.load('castaways')
df.head()

No matter which method you choose, you’ll get rich Survivor data, neatly packaged and ready to explore with your favorite pandas tools.

Keeping data up to date

On first import, survivorpy fetches and caches all the tables locally, which might feel a bit slow. The upside is that after this initial step, loading data—whether via load() or by importing tables directly—is fast and works offline.
To update your local cache with the latest data from the source (typically updated daily to match the R package survivoR), use:

sv.refresh_data()

To see a summary of what changed during the update (e.g. which tables were modified), pass verbose=True:

sv.refresh_data(verbose=True)

If you just want to see the last time your data was synced, use the LAST_SYNCED constant to get a UTC timestamp:

sv.LAST_SYNCED
# e.g., '2025-04-25T18:42:07.235Z'

Data Source and Attribution

This package provides Python access to data from the survivoR package by Daniel Oehm and contributors. We’re grateful to the folks at survivoR for maintaining such a rich and well-structured dataset.

The original data is licensed under the MIT License, and we preserve that license and attribution in accordance with its terms.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Got ideas or spot a bug? Feel free to open an issue or a pull request — contributions of all kinds are welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

survivorpy-0.1.2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

survivorpy-0.1.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file survivorpy-0.1.2.tar.gz.

File metadata

  • Download URL: survivorpy-0.1.2.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.8

File hashes

Hashes for survivorpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f3e694cb3c4f652a3357dd95b9eb3df89d4b8549d2597044e0affde2a76c1fc1
MD5 84c7a6b4b6434949e97a2fce766face8
BLAKE2b-256 c41d0ea0621e3f6dd9c3bb55ce9d186ea82caf477b6a3826ab187b1acd28bf36

See more details on using hashes here.

File details

Details for the file survivorpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: survivorpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.8

File hashes

Hashes for survivorpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3da6355ab858a0b36787e62f88949d73d755d3c1ff066c19c38e751e684eef0
MD5 e5d6f832cea271319b48a845ba22a64d
BLAKE2b-256 26ba5cc9bf6aac7db8adc807c2c656b968aabefe41e53fd9c05569d6eca0f7d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page