create_data_url#

pymc_marketing.paths.create_data_url(branch)[source]#

Create a URLPath object for the data directory on a specific branch.

Parameters:
branchstr

The branch name to create the URL for.

Returns:
URLPath

An object representing the URL path to the data directory on the specified branch.

Examples

Read MMM data from the main branch:

import pandas as pd

from pymc_marketing.paths import create_data_url

data_dir = create_data_url("main")
file = data_dir / "mmm_example.csv"
df = pd.read_csv(file)