pfb-toolkit

A python package to build portable Energy Management and Information Systems (EMIS) application in buildings.

https://github.com/baeda-polito/portable-app-framework

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: sciencedirect.com
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.7%) to scientific vocabulary

Keywords

buildings data-analytics energy fault-detection-and-diagnosis package python
Last synced: 6 months ago · JSON representation ·

Repository

A python package to build portable Energy Management and Information Systems (EMIS) application in buildings.

Basic Info
Statistics
  • Stars: 6
  • Watchers: 4
  • Forks: 2
  • Open Issues: 6
  • Releases: 2
Topics
buildings data-analytics energy fault-detection-and-diagnosis package python
Created over 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License Citation

README.md

portable-app-framework A framework for Energy Management solutions

Powered by NumFOCUS License - BSD 3-Clause

portable-app-framework is a Python package that provides a toolkit for developing, scaling and maintaining energy management and information systems (EMIS) applications using an ontology-based approach. Key contributions include an interoperable layer based on Brick schema, the formalization of application constraints pertaining metadata and data requirements, and a field demonstration. The framework allows for querying metadata models, fetching data, preprocessing, and analyzing data, thereby offering a modular and flexible workflow for application development.

Table of Contents

Main Features

Here are just a few of the things that portable-app-framework does.

Command Line Interface (CLI)

You can use the CLI to to create, manage and update applications

```

portable-app-framework -h

usage: portable-app-framework [-h] {new,update} ...

Utils CLI for the afdd framework.

positional arguments: {new,update} new Create a new application folder from template. update Update README of an application.

options: -h, --help show this help message and exit

```

Application class

A python class that helps to create a portable application. Once you created a new application in your project you can set up and run an application with the following lines of code

```python import pandas as pd import brickschema from portableappframework import Application

app = Application( metadata=brickschema.Graph(), appname='appname' ) qualifyresult = app.qualify() # True/False fetchresult = app.fetch() # Dict of mapped variables df = pd.DataFrame() # get df according to your logic dfpreprocess = app.preprocess(df) finalresult = app.analyze(df_preprocess) ```

Installation

The source code is currently hosted on GitHub at https://github.com/RobertoChiosa/portable-app-framework and the list of changes for each release can be found in the CHANGELOG.

The portable-app-framework package requires Python >= 3.9. The main dependencies are reported in the requirements.txt and in the setup.py file.

You can install the package in different ways depending on the level of usage you want to have.

  • [x] From source
  • [x] From PyPI

From source

You can install the package from source by cloning the repository and running the following command:

sh git clone https://github.com/RobertoChiosa/portable-app-framework.git cd portable-app-framework pip install .

From PyPI

You can install the stable version from PyPI with the following command:

sh pip install pfb-toolkit

Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

Most development discussions take place on GitHub in this repo, via the GitHub issue tracker.

If you are simply looking to start working with the portable_app_framework codebase, navigate to the GitHub "issues" tab and start looking through interesting issues.

Or maybe through using portable_app_framework you have an idea of your own or are looking for something in the documentation and thinking ‘this can be improved’...you can do something about it!

License

The present repository has been released under MIT LICENSE

Cite

Work on portable-app-framework started in 2021 as an internal project at BAEDA Lab to deploy energy management and information systems application in a most reliable way instead of solving implementation issues from scratch every time. We found that the framework enabled faster deployment of such solutions thanks to the builtin methods that allowed the analyst to skip ripetitive data integration tasks. Moreover allowed non analyst expert of metadata schema to exploit the power of such tools. So we decided to create this package to share our experience with the scientific community and not only.

To cite the package in publications use:

bibtex @article{CHIOSA2024114802, title = {A portable application framework for energy management and information systems (EMIS) solutions using Brick semantic schema}, journal = {Energy and Buildings}, volume = {323}, pages = {114802}, year = {2024}, issn = {0378-7788}, doi = {https://doi.org/10.1016/j.enbuild.2024.114802}, url = {https://www.sciencedirect.com/science/article/pii/S0378778824009186}, author = {Roberto Chiosa and Marco Savino Piscitelli and Marco Pritoni and Alfonso Capozzoli}, keywords = {Energy management and information systems, Portable application, Brick metadata schema, Anomaly detection, Machine learning}, abstract = {This paper introduces a portable framework for developing, scaling and maintaining energy management and information systems (EMIS) applications using an ontology-based approach. Key contributions include an interoperable layer based on Brick schema, the formalization of application constraints pertaining metadata and data requirements, and a field demonstration. The framework allows for querying metadata models, fetching data, preprocessing, and analyzing data, thereby offering a modular and flexible workflow for application development. Its effectiveness is demonstrated through a case study involving the development and implementation of a data-driven anomaly detection tool for the photovoltaic systems installed at the Politecnico di Torino, Italy. During eight months of testing, the framework was used to tackle practical challenges including: (i) developing a machine learning-based anomaly detection pipeline, (ii) replacing data-driven models during operation, (iii) optimizing model deployment and retraining, (iv) handling critical changes in variable naming conventions and sensor availability (v) extending the pipeline from one system to additional ones.} }

Owner

  • Name: BAEDA
  • Login: baeda-polito
  • Kind: organization
  • Email: baeda.lab@gmail.com
  • Location: Turin, Italy

Building Automation and Energy Data Analytics Lab

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite this paper if you use this work."
title: "A portable application framework for energy management and information systems (EMIS) solutions using Brick semantic schema"
author:
  - family-names: "Chiosa"
    given-names: "Roberto"
  - family-names: "Piscitelli"
    given-names: "Marco Savino"
  - family-names: "Pritoni"
    given-names: "Marco"
  - family-names: "Capozzoli"
    given-names: "Alfonso"
version: 0.1.11
url: "https://doi.org/10.1016/j.enbuild.2024.114802"
date-released: 2024-09-13

preferred-citation:
  type: article
  title: "A portable application framework for energy management and information systems (EMIS) solutions using Brick semantic schema"
  authors:
    - family-names: "Chiosa"
      given-names: "Roberto"
    - family-names: "Piscitelli"
      given-names: "Marco Savino"
    - family-names: "Pritoni"
      given-names: "Marco"
    - family-names: "Capozzoli"
      given-names: "Alfonso"
  journal: "Energy and Buildings"
  volume: 323
  start: 114802 # First page number
  year: 2024
  doi: "https://doi.org/10.1016/j.enbuild.2024.114802"
  issue: 1

GitHub Events

Total
  • Issues event: 1
  • Watch event: 2
  • Pull request event: 3
  • Fork event: 1
  • Create event: 3
Last Year
  • Issues event: 1
  • Watch event: 2
  • Pull request event: 3
  • Fork event: 1
  • Create event: 3

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 219
  • Total Committers: 2
  • Avg Commits per committer: 109.5
  • Development Distribution Score (DDS): 0.064
Past Year
  • Commits: 78
  • Committers: 2
  • Avg Commits per committer: 39.0
  • Development Distribution Score (DDS): 0.051
Top Committers
Name Email Commits
RobertoChiosa r****a@g****m 205
Giudice7 r****7@g****m 14

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 6
  • Total pull requests: 6
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 0.17
  • Average comments per pull request: 0.17
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 5
Past Year
  • Issues: 2
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
  • RobertoChiosa (3)
  • Giudice7 (1)
Pull Request Authors
  • dependabot[bot] (8)
  • RobertoChiosa (1)
Top Labels
Issue Labels
bug (1) help wanted (1)
Pull Request Labels
dependencies (8)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 23 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
pypi.org: pfb-toolkit

Portable Framework for Building Applications - PFB-Toolkit

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 23 Last month
Rankings
Dependent packages count: 10.8%
Average: 35.7%
Dependent repos count: 60.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • jupyter-book *
  • matplotlib *
  • numpy *
.github/workflows/deploy-docs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • peaceiris/actions-gh-pages v4.0.0 composite
.github/workflows/publish-package.yml actions
  • actions/checkout v4 composite
  • actions/create-release v1 composite
  • actions/download-artifact v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
poetry.lock pypi
  • 141 dependencies
pyproject.toml pypi
  • jupyter-book ^1.0.0 docs
  • matplotlib ^3.9.0 docs
  • numpy ^2.0.0 docs
  • pandas ^2.2.2 docs
  • rdflib ^6.2.0 docs
  • buildingmotif ^0.2.0b0
  • inquirer ^3.3.0
  • pandas ^2.2.2
  • pyshacl 0.21
  • pytest ^8.2.2
  • python ^3.11
  • setuptools ^65.7.0