Skip to main content

tidytuesdayPy

Download TidyTuesday data. Inspired by tidytuesdayR.

Usage

from tidytuesday import TidyTuesday

tt = TidyTuesday("2021-04-06")

If you do not provide a date (i.e. just TidyTuesday()), then the latest TidyTuesday will be used. Note that this will not be good for reproducability in the future!

You can then access each data set from the data field using the filename, dropping the extension.

df = tt.data["forest"]

You can also access the readme if one exists.

print(tt.readme)

Polars

If you want to use Polars, you can pass the module to the TidyTueday constructor via the optional mod argument as follows:

import polars as pl

tt = TidyTuesday("2021-04-06", mod=pl)

tt.data["forest"] # is a pl.DataFrame

For future dataframe modules, you can pass as the mod argument any object/module that has a read_csv that returns an object.

The constructor also has an optional kwargs argument that allows you to pass a dictionary of kwargs to the read_csv method. For instance, this can be used to specify separators in pl.read_csv as follows:

tt = TidyTuesday("2020-08-25", mod=pl, kwargs={"separator": "\t"}) # contains chopped.tsv

tt.data["chopped"] # is a pl.DataFrame

If using the default Pandas, sepcifying tab separation should not be needed.

TODO

  • Implement parsers for rds formats
  • Documentation

Metadata

Release files for tidytuesday 0.1.0

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

Source distribution (sdist)

Source distribution for tidytuesday 0.1.0
File Size Uploaded
tidytuesday-0.1.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tidytuesday 0.1.0
File Interpreter ABI Platform
tidytuesday-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / tidytuesday-0.1.0.tar.gz

Download URL tidytuesday-0.1.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
93ad2979a42a6723872871b5ed08d7baa8a3d21f7b445c9fca78d57ed9c92556
BLAKE2b-256 checksum
How to use checksums
bb0695f198e7336a9db6e1ab4eca250af9cd7e5ba05ebfb03e1af1ab339c0a07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.20

Release files / tidytuesday-0.1.0-py3-none-any.whl

Download URL tidytuesday-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86a061194fc7a6c0f2b8fa71dfef56913665159925ace2844e044ccadf7af7da
BLAKE2b-256 checksum
How to use checksums
01e651da8a41501683bbe08e145737c2236932693a07ec483fa3423d7f3a00d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.20

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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