Skip to main content

Tools to read files from probes, sensors, or anything used in hydrogeology.

Project description

HydroSensorReader

Python 3.6 License: MIT pypi version

Build Status Coverage Status Build status codecov Codacy Badge

This project aims to provide a simple way to read scientific files produced by any kind of probe, sensor, or anything used in hydrogeology.

Installation

You can directly install this package with the command: pip install HydroSensorReader.

After the installation, you can use the package by using

import hydsensread as hsr

# File based reader
file_path = 'my_file_path'

# Files Generating Timeseries results
# =====================================

# read CR1000 files
r = hsr.DATCampbellCRFileReader(file_path)

# read Hanna multiparameter probes 
# - (model HI-9828 and HI-9829 tested)
# - Supported extension : '.xls', '.xlsx'
r = hsr.XLSHannaFileReader(file_path)

# Read Solinst Levelogger and Barologger files
# - Supported extension : '.lev', '.xle', '.csv'
r = hsr.SolinstFileReader(file_path)

# Plot the results with
r.plot()

# Files Generating Generic results
# =====================================
# read Maxxam laboratory analysis files.
# - Supported extension : '.xls', '.xlsx'
r = hsr.XSLMaxxamFileReader(file_path)


# Web data scrappers 
# These data scrappers use the station name.
station = 'StationName'
r = hsr.GNBWaterQualityStation(station)

Dependencies

Main package definition

file_reader

Implementation of different file readers. Each python file contains a main launcher to the class.

  • compagny_file_reader - Reader of generated files comming from different probes or labs.
  • web_page_reader - Web crawlers in charge of extracting data from web sites

file_parser

This package contains the classes in charge of reading the different files. More information about these packages is available in the code.

  • abstract_file_parser.py
    • AbstractFileParser - Abstract class used as an interface to implement the others
  • concrete_file_parser.py
    • CSVFileParser
    • TXTFileParser
    • EXCELFileParser
    • WEB_XMLFileParser

site_and_records

This package contains classes defining the domain elements and the data describing them

  • site.py
    • Site - A basic site class with the site name a the visited date
    • SensorPlateform - A Plateform is an object that can take measurements as a standalone object
    • Sample - Sample as an object manipulated by a laboratory
    • StationSite - Modelisation of a station object
    • StreamFlowStation - This specialized class was created to store the information of the ECCC website
  • records.py
    • Parameter - Class acting as a structure to store a parameter value (what is observed) and its associated unit
    • Record - A record must have a date, a parameter, a unit, and a value.
    • TimeSeriesRecords - The record_date corresponds to the first date of the list of values. Values are stored as a Dict as follows :
      • { date1: value1, date2: value2,...}
    • ChemistryRecord -A chemistry record has a detection limit, a report date, an analysis type and all the attributes of a Record

file_example

This folder contains several examples of files for testing.

Work To Do

  • Add a .LAS reader to take care of borehole geophysics files
  • Add a .LAS reader to take care of LiDar data
  • Create a Strategy class so you can input a file and the strategy class select the correct file_reader class
  • Continue documentation... always...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

HydroSensorReader-1.7.2.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

HydroSensorReader-1.7.2-py3-none-any.whl (47.1 kB view details)

Uploaded Python 3

File details

Details for the file HydroSensorReader-1.7.2.tar.gz.

File metadata

  • Download URL: HydroSensorReader-1.7.2.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for HydroSensorReader-1.7.2.tar.gz
Algorithm Hash digest
SHA256 043ee977ced92e49499a3c96407fee449b9302b3b04e796348a84e06bfd07500
MD5 74e85eff32830262ebe2f525637c2ad7
BLAKE2b-256 b3270e0cf9f0df7ade1d026ed7df529334ef99a65f6dbc188c4c5914a85deb88

See more details on using hashes here.

File details

Details for the file HydroSensorReader-1.7.2-py3-none-any.whl.

File metadata

  • Download URL: HydroSensorReader-1.7.2-py3-none-any.whl
  • Upload date:
  • Size: 47.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for HydroSensorReader-1.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 17d4f0d5d4caed4f2f26fcff109d14fc05bf3aa56d8620ce242256831571a828
MD5 60569152d2582404a48525c122077508
BLAKE2b-256 37abdced7a62dbe4a6b99b270a6175b48c4842701b8e781156b678121c9b5d81

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page