watex.geology.drilling.DSBoreholes#
- class watex.geology.drilling.DSBoreholes(area=None, holeid=None, lat=None, lon=None, projection='ll', utm_zone=None, datum='WGS84', epsg=None, encoding='utf-8', interp_coords=False, reference_ellipsoid=23, verbose=False)[source]#
Class deals with many boreholes dataset.
DSBoreholes works with the data set composed of multiple borehole data. The data columns are the all attributes of the object and any non-alphateic character is by
_. For instance, a column namelayer thicknessshould have an attribute namedlayer_thickness. Each borehole (row) data become its own object which encompasses all columns as attributes. To have full control of how data must be retrieved,holeidparameter must be set. For instance, to retrieve the borehole with ID equals to bx02, after fitting the class with appropriate parameters, attibute hole depth ( if exist in the data) can be retrieved asself.hole.bx02.hole_depth.By default if the projection is given as latitude/longitude
- Parameters:
area (str) – Name of area where the data collection is made.
holeid (str, optional) –
- The name of column of the boreholes collections ID. Note that if
given, it must exist in the borehole datasets. Note that if hole ID is not specified, each borehole can be fetched from a attribute hole count from 0 to n_samples. For instance, the borehole number 12 can be collected using:
>>> b = DSBoreholes ().fit(<borehole_data>) >>> b.hole.hole11
where 12 is the 12em position as Python index starts with 0. However when holeid is specified, the hole attribute is replaced by each value of the hole_id column as:
>>> borehole_data['hole_id'][:3] 0 B0092 1 B0093 2 B0094 Name: hole_id, dtype: object >>> b.hole.B0092 >>> b.hole.B0094
where
B0092orB0094are the borehole in the columnshole_id. Note thathole_idcan be any other names at least it is explicitly specified as a argument of the ``holeid` parameter.lon (ArrayLike 1d /str , optional) – One dimensional arrays. xlon can be consider as the abscissa of the landmark and ylat as ordinates array. If xlon or ylat is passed as string argument, data must be passed as fit_params keyword arguments and the name of xlon and y must be a column name of the data. By default xlon and ylat are considered as longitude and latitude when
dmsorllcoordinate system is passed.lat (ArrayLike 1d /str , optional) – One dimensional arrays. xlon can be consider as the abscissa of the landmark and ylat as ordinates array. If xlon or ylat is passed as string argument, data must be passed as fit_params keyword arguments and the name of xlon and y must be a column name of the data. By default xlon and ylat are considered as longitude and latitude when
dmsorllcoordinate system is passed.utm_zone (Optional, string) – zone number and ‘S’ or ‘N’ e.g. ‘55S’. Default to the centre point of coordinates points in the survey area. It should be a string (##N or ##S) in the form of number and North or South hemisphere, 10S or 03N
projection (str, ['utm'|'dms'|'ll']) – The coordinate system in which the data points for the profile is collected. If not given, the auto-detection will be triggered and find the suitable coordinate system. However, it is recommended to provide it for consistency. Note that if x and y are composed of value less than 180 degrees for longitude and 90 degrees for latitude, it should be considered as longitude-latitude (
ll) coordinates system. If x and y are degree-minutes-second (dmsordd:mm:ss) data, they must be specify as coordinate system in order to accept the non-numerical data before transforming toll. Ifdatais passed to thefit()method anddmsis not specify, x and y values should be discarded.datum (string, default = 'WGS84') – well known datum ex. WGS84, NAD27, NAD83, etc.
epsg (Optional, int) –
- epsg number defining projection (
see http://spatialreference.org/ref/ for moreinfo)
Overrides utm_zone if both are provided.
encoding (str, default ='utf8') – Default encoding for parsing data. Can also be [‘utf-16-be’] for reading bytes characters.
interp_coords (bool, default=False) – Interpolate position coordinates.
reference_ellipsoid (int, default=23) – reference ellipsoids is derived from Peter H. Dana’s website- http://www.utexas.edu/depts/grg/gcraft/notes/datum/elist.html Department of Geography, University of Texas at Austin Internet: pdana@mail.utexas.edu . Default is
23constrained to WGS84.verbose (int, default=0) – Output messages.
- lon_, lat_
longitude/latitude of coordinates arrays.
- Type:
Arraylike,
- `hole.<holeid>.<data_column>`
Each borehole, commonly which ID correspond to each row. Each row can be fetched as ‘holeID’. If holeid is nt specified, the string literal hole+index of data composed the borehole object.
- Type:
Notes
When data is supplied and lon and lat are given by their names existing in the dataframe columns, by default, the non-numerical data are removed. However, if y and x are given in DD:MM:SS in the dataframe, the coordinate system must explicitly set to ``dms` to keep the non-numerical values in the data.
Examples
>>> import watex as wx >>> from watex.geology import DSBoreholes >>> bs_data = wx.fetch_data ('nlogs', key='hydro', samples=12 , as_frame=True ) >>> bs=DSBoreholes ().fit(bs_data) >>> bs.holeid Out[61]: 'hole' >>> # when the default object hole is set as: >>> bs.hole # outputs a Boxspace object each borehole can be retrieved >>> # as hole object count from 0. to number or rows -1. Here is an >>> example of fetching the hole 11. >>> bs.hole.hole10 Out[62]: {'hole_id': 'B0103', 'uniform_number': 1.1343e+16, 'original_number': 'Guangzhou multi-element urban geological survey drilling 19ZXXSW11', 'lon': '113:43:00.99', 'lat': '23:16:17.23', 'longitude': 113.71694166666668, 'latitude': 23.271452777777775, 'east': 2577207.0, 'north': 19778060.0, 'easting': 2577207.276, 'northing': 19778177.29, 'coordinate_system': 'Xian 90', 'elevation': 22.0, 'final_hole_depth': 60.1, 'quaternary_thickness': 45.8, 'aquifer_thickness': 18.1, 'top_section_depth': 42.0, 'bottom_section_depth': 60.1, 'groundwater_type': 'igneous rock fissure water', 'static_water_level': 2.36, 'drawdown': 28.84, 'water_inflow': 0.08, 'unit_water_inflow': 0.003, 'filter_pipe_diameter': 0.16, 'water_inflow_in_m3_d': 2.94} >>> # when we specified the hole ID to the column that compose the ID like: >>> bs=DSBoreholes (holeid ='hole_id').fit(bs_data) >>> bs.hole.B0103 Out[63]: {'hole_id': 'B0103', 'uniform_number': 1.1343e+16, 'original_number': 'Guangzhou multi-element urban geological survey drilling 19ZXXSW11', 'lon': '113:43:00.99', 'lat': '23:16:17.23', 'longitude': 113.71694166666668, 'latitude': 23.271452777777775, 'east': 2577207.0, 'north': 19778060.0, 'easting': 2577207.276, 'northing': 19778177.29, 'coordinate_system': 'Xian 90', 'elevation': 22.0, 'final_hole_depth': 60.1, 'quaternary_thickness': 45.8, 'aquifer_thickness': 18.1, 'top_section_depth': 42.0, 'bottom_section_depth': 60.1, 'groundwater_type': 'igneous rock fissure water', 'static_water_level': 2.36, 'drawdown': 28.84, 'water_inflow': 0.08, 'unit_water_inflow': 0.003, 'filter_pipe_diameter': 0.16, 'water_inflow_in_m3_d': 2.94} >>> # each columns can be fetched as >>> bs.quaternary_thickness Out[64]: 0 40.5 1 12.3 2 25.5 3 40.0 4 35.0 5 47.0 6 34.0 7 40.4 8 15.1 9 17.2 10 45.8 11 47.0 Name: quaternary_thickness, dtype: float64