import pandas as pd
from ChannelAttributionPro import *
import urllib.request
Data = pd.read_csv("https://channelattribution.net/csv/Data.csv",sep=",")
password="yourpassword"
res=markov_model(Data, var_path="path", var_conv="total_conversions",
var_null="total_null", flg_write_paths=1,password=password)
mta_path_attribution=res['attribution']
mta_path_attribution=mta_path_attribution[["path_id","path","channel","total_conversions"]]
mta_path_attribution.columns=["path_id","path","channel","attribution"]
print(mta_path_attribution)
mmm_attribution=pd.DataFrame(
{"channel":["alpha","eta","iota","beta","theta","lambda","epsilon","omega"],
"attribution":[4826.18,2757.64,2574.60,1454.74,913.53,418.50,407.34,800.00]})
print(mmm_attribution)
final_path_attribution=combine_mta_mmm(mta_path_attribution, mmm_attribution, password=password)
print(final_path_attribution)
prior_weights_mta=pd.DataFrame({"channel":["alpha"],"mta_weight":[0.2]})
final_path_attribution=combine_mta_mmm(mta_path_attribution, mmm_attribution,
prior_weights_mta=prior_weights_mta, password=password)
print(final_path_attribution)