Installing py-cptcore

To install pycptcore, we strongly recommend using Python Package Index (PyPI). You can install pycptcore with:

pip install pycptcore

How to import py-cptcore

Getting started with pycptcore is easy done by importing the pycptcore library:

In [1]: import pycptcore

or any equivalent import statement.

How to initialize class

# create object
In [2]: result = pycptcore.SoilProperties.from_api_response(
   ...:     response_parse, response_classify
   ...: )
   ...: 

In [3]: fig = result.plot()

In [4]: result.layer_table.dataframe
Out[4]: 
     geotechnicalSoilName  lowerBoundary  ...   phi undrainedShearStrength
0                    zand           2.91  ...  30.0                      0
1              kleiigVeen           3.51  ...  15.0                     20
2                    veen           4.01  ...  15.0                     20
3              kleiigVeen           4.91  ...  15.0                     20
4                    veen           5.81  ...  15.0                     20
5                    klei           8.31  ...  30.0                     15
6                    zand          10.21  ...  30.0                      0
7          zwakZandigSilt          10.61  ...  27.5                     15
8                    veen          11.71  ...  15.0                     20
9                    klei          12.81  ...  30.0                     15
10         zwakZandigSilt          13.21  ...  27.5                     15
11                   zand          14.01  ...  30.0                      0
12  zand; zwakGrindigZand          14.91  ...  35.0                      0
13                   zand          15.81  ...  30.0                      0
14         zwakZandigSilt          17.21  ...  27.5                     15
15                   zand          21.01  ...  30.0                      0
16  zand; zwakGrindigZand          23.41  ...  35.0                      0
17                   zand          26.01  ...  30.0                      0
18         zwakZandigSilt          29.21  ...  27.5                     15
19                   zand          30.41  ...  30.0                      0
20         zwakZandigSilt          32.51  ...  27.5                     15
21                   zand          35.92  ...  30.0                      0

[22 rows x 10 columns]
../_images/cpt_classify.png