Skip to main content

A Python wrapper for data from the R package survivoR.

Project description

SurvivorPy

PyPI Downloads PyPI Version Python Versions License: MIT Build Status Last Commit

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.3.tar.gz (9.7 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.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: survivorpy-0.1.3.tar.gz
  • Upload date:
  • Size: 9.7 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.3.tar.gz
Algorithm Hash digest
SHA256 d841fd64fb2b707a0eb1dd998490f05a736e0b417163b3b23d9f90940e7e4abe
MD5 d25061c8a5c1ce17afe592b00e0eca12
BLAKE2b-256 eb01acba6fd3872db713c196d29ec8ff8e975b5f64f14b4be6cf8bb5d5f9e040

See more details on using hashes here.

File details

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

File metadata

  • Download URL: survivorpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ffeb49d815f318084799be30116bf97b34d01d99072b100c529c390979d7bd3b
MD5 50eaa21a23ffb5efc35ceb6891ba009f
BLAKE2b-256 ca93ed9e7f7205b6127f501a2980111b90312a32ecaf578ea41c888d1916c227

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