GithubHelp home page GithubHelp logo

genematx / uv_monitor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 831 KB

Example of UV-B Data Processing

License: MIT License

Makefile 0.24% Dockerfile 0.10% Shell 0.05% Python 2.34% Jupyter Notebook 97.27%

uv_monitor's Introduction

uv_monitor

An example repository exploring the UV-B monitoring dataset from the National Resource Ecology Laboratory at CSU.

Getting Started

The dataset can be downloaded from the oficial NREL website. In this example, we use the Erythemal weighted irradiance data for locations in Colorado and New Zealand; the required csv files can be downloaded and prepared with a convenience script by running make unzip-data in the terminal.

The code is written in tested in Python 3.11. The required packages are managed with poetry, and the software is conteinerized with Docker.

The database querying functionality uses the OpenAI GPT model and requires an API key to be set up; the key can be obtained here. The key can be exported as an environment variable. Alternatively, create an .env file in the root directory and declare the key in it: OPENAI_API_KEY="key_value_obtained_from_openai".

Repository Contents

  • src/uv_monitor - main .py files:

    • dataio.py - utilities for loading and saving the data;
    • logging.py - defines and configures a project-wide logger;
    • anomaly.py - time-series anomaly detection for data quality assesment;
    • utils.py - other helper functions, e.g. for plotting.
  • notebooks - Jupyter notebooks useful for data exploration. To reduce the amount of data stored in the remote repository, the notebooks can be converted from .ipynb format to .py files with the jupytext utility. For this run the following command in the terminal:

    poetry run jupytext --set-formats ipynb,py notebooks/*
    
  • tests - unit tests implemented with pytest. Run make test to perform the testing.

  • app - an example of a web-interface for the data query app. The following command will initialize the app, start a local web server, and open the browser:

    poetry run python app/app.py
    

    Alternatively, one can deploy the app in the Docker container by calling make run-app and then navigate to http://localhost:7860 in the browser.

  • docker - definitions of the Docker image.

  • .github/workflows - definitions of the CI/CD pipeline on GitHub that performs testing, formatting, and linting of the code on each push to the remote repository. These actions can be done locally as well by running make test, make fmt, and make lint respectively.

uv_monitor's People

Contributors

qrious-eugene avatar genematx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.