{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 17 Plotting Orientations with mplstereonet\n", "\n", "Orientation measurements stored as GeoDataFrame can easily be plotted using ``GemGIS`` and ``mplstereonet``.\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Set File Paths and download Tutorial Data\n", "\n", "If you downloaded the latest `GemGIS` version from the Github repository, append the path so that the package can be imported successfully. Otherwise, it is recommended to install `GemGIS` via `pip install gemgis` and import `GemGIS` using `import gemgis as gg`. In addition, the file path to the folder where the data is being stored is set. The tutorial data is downloaded using Pooch (https://www.fatiando.org/pooch/latest/index.html) and stored in the specified folder. Use `pip install pooch` if Pooch is not installed on your system yet." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2021-03-17T11:14:58.699578Z", "start_time": "2021-03-17T11:14:56.393197Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\ale93371\\Anaconda3\\envs\\gemgis\\lib\\site-packages\\gemgis\\gemgis.py:27: UserWarning: Shapely 2.0 is installed, but because PyGEOS is also installed, GeoPandas will still use PyGEOS by default for now. To force to use and test Shapely 2.0, you have to set the environment variable USE_PYGEOS=0. You can do this before starting the Python process, or in your code before importing geopandas:\n", "\n", "import os\n", "os.environ['USE_PYGEOS'] = '0'\n", "import geopandas\n", "\n", "In a future release, GeoPandas will switch to using Shapely by default. If you are using PyGEOS directly (calling PyGEOS functions on geometries from GeoPandas), this will then stop working and you are encouraged to migrate from PyGEOS to Shapely 2.0 (https://shapely.readthedocs.io/en/latest/migration_pygeos.html).\n", " import geopandas as gpd\n" ] } ], "source": [ "import gemgis as gg\n", "\n", "file_path ='data/17_plotting_orientations_with_mplstereonet/'" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2021-03-17T11:14:58.777703Z", "start_time": "2021-03-17T11:14:58.748465Z" } }, "outputs": [], "source": [ "gg.download_gemgis_data.download_tutorial_data(filename=\"17_plotting_orientations_with_mplstereonet.zip\", dirpath=file_path)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Loading the Data" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2020-12-23T11:00:31.358865Z", "start_time": "2020-12-23T11:00:24.820600Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "formation | \n", "dip | \n", "azimuth | \n", "geometry | \n", "
---|---|---|---|---|---|
0 | \n", "None | \n", "Sand | \n", "25.00 | \n", "310 | \n", "POINT (49.24855 1033.89335) | \n", "
1 | \n", "None | \n", "Sand | \n", "30.00 | \n", "315 | \n", "POINT (355.21200 947.55713) | \n", "
2 | \n", "None | \n", "Sand | \n", "15.00 | \n", "330 | \n", "POINT (720.24760 880.91163) | \n", "
3 | \n", "None | \n", "Clay | \n", "10.00 | \n", "135 | \n", "POINT (526.36977 611.30027) | \n", "
4 | \n", "None | \n", "Clay | \n", "25.00 | \n", "140 | \n", "POINT (497.59103 876.36762) | \n", "
5 | \n", "None | \n", "Clay | \n", "35.00 | \n", "50 | \n", "POINT (394.59343 481.03860) | \n", "