Commit c44fae02 authored by Asitha Senanayake's avatar Asitha Senanayake
Browse files

docs: update README and webpages

parent f86c318d
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ pip install python-ags4

>>>
**Note**
Installation requires Python 3.8 or later.
Installation requires Python 3.9 or later.
>>>

### Code Examples
@@ -61,7 +61,7 @@ tables, headings = load_test_data()
* *headings* is a dictionary of lists. Each list has the header names of the corresponding *GROUP*

>>> 
**Important:** If the above code throws an exception or returns an empty dictionary, it very likely that the input file is not a valid AGS4 file. In such a case, the `AGS4.check_file()` function can be used to validate the file and see whether anything needs to be fixed before trying again. Most users will find it easier perform this step using the [command line interface](#command-line-interface) as it will provide a formatted error report that is much easier to read than the python dictionary created by directly calling the function.
**Important:** If the above code throws an exception or returns an empty dictionary, it very likely that the input file is not a valid AGS4 file. In such a case, the `AGS4.check_file()` function can be used to validate the file and see whether anything needs to be fixed before trying again. Most users will find it easier to perform this step using the [command line interface](#command-line-interface) as it will provide a formatted error report that is much easier to read than the python dictionary created by directly calling the function.
>>>

All data are imported as text so they cannot be analyzed or plotted immediately. You can use the following code to convert all the numerical data in a DataFrame from text to numeric.
@@ -70,7 +70,7 @@ All data are imported as text so they cannot be analyzed or plotted immediately.
LOCA = AGS4.convert_to_numeric(tables['LOCA'])
```

The `AGS4.convert_to_numeric()` function automatically converts all columns in the input DataFrame with the a numeric *TYPE* to a float. (*Note: The UNIT and TYPE rows are removed during this operation as they are non-numeric.*)
The `AGS4.convert_to_numeric()` function automatically converts all columns in the input DataFrame with a numeric *TYPE* to a float. (*Note: The UNIT and TYPE rows are removed during this operation as they are non-numeric.*)

#### Export data back to an AGS4 file

@@ -83,11 +83,11 @@ A DataFrame with numeric columns may not get exported with the correct precision
LOCA_txt = AGS4.convert_to_text(LOCA, 'DICT.ags')
```

Tables converted to numeric using the ```AGS4.convert_to_numeric()``` function should always be converted back to text before exporting to an AGS4 file. (*Note: The UNIT and TYPE rows will be added back in addition to formatting the numeric columns.*) 
Tables converted to numeric using the ```AGS4.convert_to_numeric()``` function should **always** be converted back to text before exporting to an AGS4 file. (*Note: The UNIT and TYPE rows will be added back in addition to formatting the numeric columns.*) 

### Juypter Notebook
### Jupyter Notebook

We have created an example Juypter Notebook which imports an AGS file, plots boreholes on a map and creates a Striplog.  
We have created an example Jupyter Notebook which imports an AGS file, plots boreholes on a map and creates a Striplog.

[See here](./notebooks/Plot_locations_and_create_strip_log.ipynb)

@@ -107,7 +107,7 @@ A checking tool is available as of version 0.3.0 and it can be used to make sure

### Graphical User Interface using *pandasgui*

The output from `python-ags4` can be directly used with [`pandasgui`](https://github.com/adamerose/pandasgui) to view and edit AGS4 files using an interactive graphical user interface. It also provides funtionality to plot and visualize the data.
The output from `python-ags4` can be directly used with [`pandasgui`](https://github.com/adamerose/pandasgui) to view and edit AGS4 files using an interactive graphical user interface. It also provides functionality to plot and visualize the data.

```python
from pandasgui import show
+6 −6
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ pip install python-ags4

!!! note

    Installation requires Python 3.8 or later.
    Installation requires Python 3.9 or later.


### Code Examples
@@ -55,7 +55,7 @@ tables, headings = load_test_data()

!!! warning

    If the above code throws an exception or returns an empty dictionary, it very likely that the input file is not a valid AGS4 file. In such a case, the `AGS4.check_file()` function can be used to validate the file and see whether anything needs to be fixed before trying again. Most users will find it easier perform this step using the [command line interface](#command-line-interface) as it will provide a formatted error report that is much easier to read than the python dictionary created by directly calling the function.
    If the above code throws an exception or returns an empty dictionary, it very likely that the input file is not a valid AGS4 file. In such a case, the `AGS4.check_file()` function can be used to validate the file and see whether anything needs to be fixed before trying again. Most users will find it easier to perform this step using the [command line interface](#command-line-interface) as it will provide a formatted error report that is much easier to read than the python dictionary created by directly calling the function.


All data are imported as text so they cannot be analyzed or plotted immediately. You can use the following code to convert all the numerical data in a DataFrame from text to numeric.
@@ -64,7 +64,7 @@ All data are imported as text so they cannot be analyzed or plotted immediately.
LOCA = AGS4.convert_to_numeric(tables['LOCA'])
```

The `AGS4.convert_to_numeric()` function automatically converts all columns in the input DataFrame with the a numeric *TYPE* to a float. (*Note: The UNIT and TYPE rows are removed during this operation as they are non-numeric.*)
The `AGS4.convert_to_numeric()` function automatically converts all columns in the input DataFrame with a numeric *TYPE* to a float. (*Note: The UNIT and TYPE rows are removed during this operation as they are non-numeric.*)

#### Export data back to an AGS4 file

@@ -79,9 +79,9 @@ LOCA_txt = AGS4.convert_to_text(LOCA, 'DICT.ags')

Tables converted to numeric using the ```AGS4.convert_to_numeric()``` function should always be converted back to text before exporting to an AGS4 file. (*Note: The UNIT and TYPE rows will be added back in addition to formatting the numeric columns.*) 

### Juypter Notebook
### Jupyter Notebook

We have created an example Juypter Notebook which imports an AGS file, plots boreholes on a map and creates a Striplog.  
We have created an example Jupyter Notebook which imports an AGS file, plots boreholes on a map and creates a Striplog.

[See here](./notebooks/Plot_locations_and_create_strip_log.ipynb)

@@ -103,7 +103,7 @@ A checking tool is available as of version 0.3.0 and it can be used to make sure

### Graphical User Interface using *pandasgui*

The output from `python-ags4` can be directly used with [`pandasgui`](https://github.com/adamerose/pandasgui) to view and edit AGS4 files using an interactive graphical user interface. It also provides funtionality to plot and visualize the data.
The output from `python-ags4` can be directly used with [`pandasgui`](https://github.com/adamerose/pandasgui) to view and edit AGS4 files using an interactive graphical user interface. It also provides functionality to plot and visualize the data.

```python
from pandasgui import show
+1 −1
Original line number Diff line number Diff line
site_name: Official documentation - AGS4 library
repo_url: https://gitlab.com/didymograptus/ags-python-library
repo_url: https://gitlab.com/ags-data-format-wg/ags-python-library

theme:
  name: "material"