<jupyter_start><jupyter_text>`Project`The `Project` class lets us handle groups of wells. It is really just a list of `Well` objects.<jupyter_code>from welly import Project
!ls data/*.LAS
p = Project.from_las("data/P-*_out.LAS")
len(p)
p<jupyter_output><empty_output><jupyter_text>Typical, the UWIs are a disaster. Let's ignore this for now.The `Project` is really just a list-like thing:<jupyter_code>for w in p:
    print(w.uwi)<jupyter_output>100/N14A/11E05
Long = 63* 45'24.460  W
-999.25<jupyter_text>Plot curves from several wells<jupyter_code>import matplotlib.pyplot as plt
alias = {'GR': ['GR', 'GRC', 'NGT']}
fig, axs = plt.subplots(figsize=(7, 14), ncols=len(p))

for i, (ax, w) in enumerate(zip(axs, p)):
    gr = w.get_curve('GR', alias=alias)
    if gr is not None:
        ax = gr.plot(ax=ax)
    ax.set_title("GR for\n{}".format(w.uwi))
    
plt.show()<jupyter_output><empty_output><jupyter_text>Export data to pandas DataFrameThis makes a DataFrame using a dual index of UWI and Depth.<jupyter_code>keys = ['GR', 'DT']

df = p.df(keys=keys, alias=alias)
df.describe()
df.loc['100/N14A/11E05'].DT.plot()
x = df.loc['100/N14A/11E05'].index
idx = df.loc['100/N14A/11E05'].loc[(28<x) & (x<30)].index
idx<jupyter_output><empty_output><jupyter_text>QualityWe can make some tests of curve quality.<jupyter_code>import welly.quality as q
tests = {
#    'Each': [q.no_gaps],
    'GR': [q.no_monotonic, q.no_flat, q.all_positive],
    'DT': [q.all_positive, q.all_between(50, 200)],
}
from IPython.display import HTML
HTML(p.curve_table_html(keys=['CALI', 'GR', 'DT', 'SP'], tests=tests, alias=alias))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16544566544566544, 'fraction_numerical': 0.03785103785103785, 'mean_word_length': 5.303846153846154, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 20, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '206256', 'license': 'Apache-2.0', 'n_tokens_mistral': 719, 'n_tokens_neox': 662, 'n_words': 149, 'path': 'tutorial/04_Project.ipynb', 'repo_name': 'hyperiongeo/welly', 'size': '1638'}