Skip to content

Python package developed for the Lancaster Air Quality project

Notifications You must be signed in to change notification settings

lgouldsbrough/LancasterAQ

Repository files navigation

LancasterAQ Package

Python package developed for the Lancaster Air Quality project.

Included are tools to:

  • Convert the graph object to different formats
  • Produce exploratory plots of the data
  • Fit simple models on the data

Installation Instructions

Manual Installation

Local install

# clone from github
$ git clone https://github.com/lgouldsbrough/LancasterAQ.git
# change directory into project root
$ cd LancasterAQ

# regular install
$ pip install .
# or 
# development install 
# $ pip install -e .

Directly install from GitHub

# pip install from github
pip install git+https://github.com/lgouldsbrough/LancasterAQ.git
# or `python -m pip ...` for environment safety 
PyPi Installation WIP

PyPi Installation

$ pip install LancasterAQ

Loading in the Lancaster AQ dataset

import LancasterAQ as laq

# load the data
data = laq.dataset()

Convert the data to different formats

note: to avoid implicit data copies replace the data object with the dataset function call. For example:data.to_numpy() to laq.dataset().to_numpy()

Convert to a numpy sparse array

# returns the graph adjacency matrix as a numpy array
numpy_array = data.to_numpy()

Convert to a dictionary of dictionaries

# returns adjacency representation of graph as a dictionary of dictionaries
dict_of_dicts = data.to_dict()

Convert to an edge list

# returns a list of edges in the graph
edge_list = data.to_edgelist()

Convert to a dictionary of lists

# returns adjacency representation of graph as a dictionary of lists
dict_of_lists = data.to_dict_of_lists()

Convert to a scipy sparse array

# returns the graph adjacency matrix as a scipy sparse array
scipy_sparse_array = data.to_scipy()

Convert to JSON

# returns json object of graph
data_json = data.to_json()

Convert to geopandas

# 

Data exploration

#

Examples of model fitting

#

Further information

Measurements taken around Lancaster on the ... Measurement equipment ...

About

Python package developed for the Lancaster Air Quality project

Resources

Stars

Watchers

Forks

Languages