Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the dielplot #34

Merged
merged 4 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Python ${{ matrix.python }} tests
steps:
- name: Checkout branch
Expand All @@ -17,13 +17,12 @@ jobs:
python-version: ${{ matrix.python }}

- name: Install poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.4
create_virtualenvs: true
virtualenvs-create: true

- name: Install dependencies
run: poetry install
run: poetry install --no-interaction

- name: Run tests and generate coverage report
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.ipynb

*.DS_Store

# Byte-compiled / optimized / DLL files
Expand Down
35 changes: 26 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
# atmospy: visualization and analysis tools for air quality data in python
# atmospy: air quality data visualization


[![PyPI version](https://badge.fury.io/py/quantaq-cli.svg)](https://badge.fury.io/py/atmospy)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/atmospy)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/quant-aq/atmospy/blob/master/LICENSE)
<!-- [![PyPI version](https://badge.fury.io/py/quantaq-cli.svg)](https://badge.fury.io/py/atmospy) -->
<!-- ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/atmospy)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/quant-aq/atmospy/blob/master/LICENSE) -->
![run and build](https://github.com/quant-aq/atmospy/workflows/run%20and%20build/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/quant-aq/atmospy/branch/master/graph/badge.svg)](https://codecov.io/gh/quant-aq/atmospy)
<!-- [![codecov](https://codecov.io/gh/quant-aq/atmospy/branch/master/graph/badge.svg)](https://codecov.io/gh/quant-aq/atmospy) -->


Atmospy is...
`atmospy` is a Python visualization library based on matplotlib and seaborn.

## Documentation

Docs are built using sphinx
Coming soon.

## Dependencies

### Supported Python versions

`atmospy` supports Python 3.8+.

### Mandatory dependencies

* numpy
* pandas
* seaborn
* matplotlib

## Installation

The latest stable release can by installed by installing directly from Github:

```sh
$ pip install git+https://github.com/dhhagan/atmospy.git
```

## Testing

## Development

Atmospy development takes place on GitHub: https://github.com/quant-aq/atmospy
`atmospy` development takes place on GitHub: https://github.com/dhhagan/atmospy

Please submit bugs that you encounter to the [issue tracker](https://github.com/quant-aq/atmospy/issues) with a reproducible example that clearly demonstrates the problem.
Please submit bugs that you encounter to the [issue tracker](https://github.com/dhhagan/atmospy/issues) with a reproducible example that clearly demonstrates the problem.
24 changes: 16 additions & 8 deletions atmospy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
from pkg_resources import get_distribution
from importlib.metadata import version

import warnings
import pandas as pd
import numpy as np
import math
import os
# import warnings
# import pandas as pd
# import numpy as np
# import math
# import os

from .york import *
from .utils import *
from .calendar import *
from .relational import *
from .trends import *
from .rcmod import *

__version__ = get_distribution('atmospy').version
# Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()

# Determine the atmospy version
__version__ = version('atmospy')
Empty file added atmospy/_base.py
Empty file.
18 changes: 18 additions & 0 deletions atmospy/calendar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""This file will contain figures for:

1. Calendar
2. straight line calendar thing like Sentry?
"""
from .utils import (
remove_na,
)
from seaborn import (
FacetGrid,
)

__all__ = ["calendarplot", ]


def calendarplot():
"""Calendar plot with func for faceting by week, month, year, etc"""
return
35 changes: 35 additions & 0 deletions atmospy/distributions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from .utils import (
remove_na,
)
from seaborn import (
FacetGrid,
)

__all__ = ["psdplot", ]


def psdplot(
data=None, *,
x=None, y=None, row=None, col=None,
**kwargs
):
"""Plot a particle size distribution.

Parameters
----------
data : _type_, optional
_description_, by default None
x : _type_, optional
_description_, by default None
y : _type_, optional
_description_, by default None
row : _type_, optional
_description_, by default None
col : _type_, optional
_description_, by default None
"""
return


def bananaplot():
return
41 changes: 41 additions & 0 deletions atmospy/rcmod.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import seaborn as sns

__all__ = ["set_theme"]

def set_theme(context="notebook", style='white', palette='colorblind',
font='sans-serif', font_scale=1, color_codes=True, rc=None):
"""_summary_

This mostly passes down to the seaborn function of the same name, but with a
few opinions mixed in.

Parameters
----------
context : str, optional
_description_, by default "notebook"
style : str, optional
_description_, by default 'white'
palette : str, optional
_description_, by default 'colorblind'
font : str, optional
_description_, by default 'sans-serif'
font_scale : int, optional
_description_, by default 1
color_codes : bool, optional
_description_, by default True
rc : _type_, optional
_description_, by default None
"""
default_rcparams = {
"mathtext.default": "regular"
}

if rc is not None:
rc = dict(default_rcparams, **rc)
else:
rc = default_rcparams

sns.set_theme(
context=context, style=style, palette=palette,
font=font, font_scale=font_scale, color_codes=color_codes, rc=rc
)
14 changes: 14 additions & 0 deletions atmospy/relational.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""This file will contain regression figures.
"""
from .utils import (
remove_na,
)
from seaborn import (
FacetGrid,
)

__all__ = ["regplot", ]

def regplot():
"""Standard regression plot between two variables.
"""
Loading
Loading