<jupyter_start><jupyter_text>Table of Contents<jupyter_code>import numpy as np
from ipywidgets import interact_manual, Layout
import ipywidgets as widgets
from IPython.display import display<jupyter_output><empty_output><jupyter_text>Making use of the m-evo data for wri file shared with us in this basecamp link, i have calculated the linear regresion needed for the interactive chart.  We need to note that the baseflow is a percentage representation of the flow, that came from groundwaters.<jupyter_code>Cattle = widgets.IntSlider(min=0, max=100, step=1,continuous_update=False, value=0)

def f(x):
    d=x/100
    Flow = 0.40326 + (d*(0.27296-0.40326))
    
    Baseflow = 0.7269 + (d*(0.55989493-0.7269))
    
    Evaporation = 1-Flow
    print('Evaporation: ',round(Evaporation*100),' %')
    print('Flow: ',round(Flow*100),' %')
    print('Baseflow: ',round(Baseflow*100),' % of flow')
    print('Which means: ')
    print('ground water runoff:', round(Flow*Baseflow*100),' %')
    print('surface runoff:', round(Flow*(1-Baseflow)*100),' %')
out =widgets.interactive_output(f, {'x': Cattle})    
ui = widgets.VBox([Cattle,out])
display(ui)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13678844519966016, 'fraction_numerical': 0.05352591333899745, 'mean_word_length': 5.232804232804233, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '191739', 'license': 'MIT', 'n_tokens_mistral': 450, 'n_tokens_neox': 402, 'n_words': 102, 'path': 'ResourceWatch/data_management/cow_visualization.ipynb', 'repo_name': 'resource-watch/notebooks', 'size': '1177'}