VOCs and PFAs Interactive Spatiotemporal Representation with Python and Folium - Tutorial

Analysis of groundwater chemistry is a difficult task for the limited set of monitoring samples, the limited samples and the limited analized components. In order to assess the actual extension of a contamination plume or the efficiency of remediation techniques we need new and innovative methods to plot and analyze water chemistry data with open source data. We have done an applied case of interactive VOCs and PFAs representation on a Jupyter notebook with Python, Folium and Ipywidgets. The dataset has more than 3300 samples of 127 points over a period of 30 years and corresponds to a contaminated site of a former airfield.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Data extraction and spatial / 3D representation from BGS borehole data in AGS format with Python

Open lithology datasets are scarce and most times they come in certain exchange formats that can´t be easily coupled with other softwares. Python has the tools to read and extract data from those files and provide them in more friendly formats as csv or xlsx. With the use of spatial libraries as Fiona or 3D visualization libraries as Pyvistas we can go one step further and process our data as shapefiles or vtks.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to install the Python geological modeling library Gempy in Windows with Debian and WSL

Gempy is an open-source library for modeling geology written in Python. The library is capable of creating complex 3D geological models including structures, fault networks, and unconformities and it can be coupled with uncertainty analysis.

Due to the required packages and specific configuration the installation of Gempy is a challenge on Windows, we have developed an alternative installation process by the use of a Debian kernel under a Windows Subsystem for Linux. This tutorial shows the complete procedure to install Gempy from the Debian kernel setup to the review of the Gempy in Python.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to create a point/line/polygon shapefile with Python and Fiona - Tutorial

Storage, management and analysis of geospatial vector data as an ESRI shapefile is a common procedure of GIS and related professionals. The generation of these spatial files can be done not only on a desktop software but also by Python commands. We have created an applied example that shows the procedure in Python to create point, line, and polygon shapefiles from a csv file by the use of the Fiona library.

Read More
6 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to install Python geospatial libraries (Gdal, Fiona, Rasterio, etc) under a Conda Env in Windows

Python is a great tool for spatial analysis and geomachine learning, however sometimes the Windows operating system presents some difficulties to install and run the bunch of Python libraries such as Gdal, Fiona, Geopandas, Rasterio. We are aware that most geoscientists, water resources specialists and related professionals work on Windows, therefore we are always in the search of new ways to get Python working with all its geospatial capabilities in every computer. We have created a tutorial that shows the installation process of the Python geospatial libraries in Windows by the use of a Conda environment; the process is simple on its steps, however the sequence and factors related to the package compatibility are important on the installation.

Read More
2 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to extract centroid coordinates in QGIS with Field Calculator - Tutorial

We did a simple procedure in QGIS but unknown to us that extracts the centroids of lines and polygons with Field Calculator commands inside the attribute table. The procedure is straightforward and does not involve the use of any intermediate layer.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

5 tutorials for crop detection and vegetation delineation with Python and QGIS

Over the last months we have researched the different tools in Python and QGIS available to recognize crops and vegetation as geospatial vector files. We have used a variety of techniques that range from machine learning algorithms with Scikit Learn and Scikit Image to just more innovative band combinations and reclassifications in QGIS. This article shows the summary of the tutorials produced so far that we are sure will be very helpful for GIS professionals and geoscientists.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

A geospatial Python class for crop recognition over drone orthophoto - Tutorial

Spatial analysis and machine learning sometimes require massive coding in order to achieve decent results such as identifying plants from a drone orthophoto. We wanted to create a simple workflow for beginner and intermediate Python users to work with these libraries without much pain or frustration. This tutorial has the complete procedure to use a Python class that recognizes plants from an orthophoto based on sample points and creates intermediate plots and identifies plants as point shapefiles.

Read More
1 Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to delineate crops from Drone Orthophotos with QGIS - Tutorial

While doing research on machine learning algorithms for drone orthophotos we found that crops can be delineated with just standard QGIS with excellent performance. Based on the addition of the blue and red band divided by the green band we can have a new vegetation index where the most healthy crops have low index values (0-1.5) and the dry crops / barren soil have high values (more than 1.9). This tutorial shows the complete procedure on QGIS to perform the delineation from bean plants on a drone orthophoto with a resolution of 5cm.

Read More
8 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to make a lake/reservoir volume-elevation curve with Python - Tutorial

Python is a programming language capable of performing calculations for hydrological studies and water resources evaluations. We have done a tutorial for the volume-elevation curve determination of the lake Patillas in Puerto Rico with Python and numerical / spatial libraries as Numpy and Rasterio. Finally, results were compared to the volume-elevation curve form a USGS survey. The procedure was done this time for a lake, but can be easily applied to any reservoir or water body when the bottom elevation is available as a raster file.

Read More
6 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to make a wind rose with Python - Tutorial

Python is a useful tool for data analysis but also for data representation and as a graphic tool. This is an applied tutorial for the representation of a wind rose with Python from wind speed and direction stored on an Excel spreadsheet. The tutorial explores the options of the library to represent windroses as bars, boxes, polygons or contours.

Read More
8 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Gypsum and Anhydrite solubility calculation with Phreeqc and Python - Tutorial

Tutorial for the calculation of the solubility and thermodynamic stability of gypsum and anhydrite. The example simulates the dissolution of two minerals in a beaker at equilibrium, and the beaker is heated step-wise from 25ºC to 75ºC. Concentrations and saturation indices for the initial solution and the batch reaction are shown as Pandas dataframes and plotted as bar diagrams on a Jupyter Notebook. Finally a plot of the saturation index for anhydrite and gypsum with temperature is generated from an iteration over the batch reaction steps.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to display anticlines / synclines in QGIS - Tutorial

There are three essential things for the representation of geological data on QGIS: the spatial geological information, an appropriate symbology and the software knowledge. Once these three things are available, the potential of QGIS to represent geological maps is unlimited.

We have done a tutorial for the representation of synclines, anticlines, overturned synclines and overturned anticlines on the regional scale with QGIS.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Seawater speciation modeling with Phreeqc coupled with Python and Pandas - Tutorial

The speciation modeling allows to calculate the distribution of aqueous species in a solution. Phreeqc is capable to simulate this speciation calculation and we are going to demonstrate this capability on a study case of aqueous species in seawater.

We have done a tutorial for the speciation modeling of seawater with Phreeqc that runs under Python in a Jupyter Lab enviroment. The code can run the Phreeqc executable, define the databases and stablish the output files. Results from simulation are available as Pandas dataframes and plots are made for the main components and the distribution of saturation indices.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Tutorial to convert geospatial data (Shapefile) to 3D data (VTK) with Python, Geopandas & Pyvista

In our perspective, 3D visualization of geospatial data has been a long desired feature that has been covered in some features from SAGA GIS or in some plugins from QGIS. This time we developed a Python script that converts point / line / polygon ESRI shapefiles (or any vector file) to unstructured grid Vtk format type (Vtu) by the use of the Python libraries Geopandas and Pyvista. The tutorial has files, scripts, and videos that show the whole procedure with some remarks on the software and spatial files and a discussion about the nature of the spatial files that presents some challenges in the data conversion.

Read More
1 Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Variable density groundwater flow modeling with MODFLOW 6 and BUY package - Tutorial

Coastal aquifers and the interaction among brine / fresh groundwater need to be evaluated with a modeling code that can deal with variable density flow. For more than 18 years, SEAWAT was the prefered (or only) open source solution implemented in Modflow 2000 with some limitations* on its use with Flopy. Now in Modflow 6 the concept of simulation involves flow and transport modeling together with exchange among them. We have done a tutorial with a simple case of variable density flow from a saline lake into an acuifer. The transient model has a duration of 50 days where the saline water "intrudes" the aquifer at the bottom part of the lake.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to geolocate drone imagery from a csv table with Python and Piexif - Tutorial

If your drone doesn´t write the GPS position on the image metadata, this is a tutorial that might be of your interest. When you have the images without any location reference and the image location on another text file you can use the code described below to generate geolocated drone imagery compatible with OpenDroneMap. The tutorial shows all the steps involved besides it has some sample data to practice.

Read More
4 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to join lines and densify vertices with Python, Fiona, Shapely - Tutorial

We have done a tutorial under the concept of "applied geospatial Python". This is an example that deals with a selective filtering of a determined road from a road geopackage. The selected road is composed of a group of lines that are merged into a Shapely LineString. Based on a Numpy linspace with the Shapely interpolate function, a set of points were distributed along the merged line path and later interpreted as a LineString. Resulting line was saved as a ESRI Shapefile file with Fiona.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Geospatial triangular interpolation with Python, Scipy, Geopandas and Rasterio - Tutorial

Under the concept of “applied geospatial Python” we have developed some procedures / tutorials of some common spatial analysis tasks done on desktop GIS software. The aim isn’t to reinvent the wheel but to explore the current Python tools and libraries that can create, analyze and represent both vector and raster spatial data.

Triangular interpolation is one of several types of interpolation techniques available in both Python and GIS software, however the advantage of working with Python is that the interpolation is a function where you can get the interpolated value on a specific point while in GIS software you are required to create a raster and sample values from the raster (.. as far as we know).

We have created a tutorial with a complete procedure in Python to import points with elevation as a attribute, creates a triangular interpolation function and has two spatial outputs: an interpolated geospatial raster in TIFF format and a shapefile with elevation attribute for another set of points. The tutorial uses several Python libraries as Matplotlib, Rasterio, Geopandas, Scipy.

Read More
2 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Hatarichem v2, the online tool to create Piper, Schoeller and Stiff Diagrams

We present our own webapp for the representation of the Piper Diagram, Stiff Diagram and Scholler Diagram. The webapp was developed in Python Django and it is entirely free for everyone. The main objective behind this webapp was to develop a user friendly and minimum requirement tool to create these water quality / hidrogeochemical diagrams. The video tutorial shows the complete procedure to update the working file and then generate the diagrams.

Read More

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.