Skip to main content

This is used for analyzing the obtain from IoT AirQo devices

Project description

AirQloud Analysis

A Python library for analyzing data from IoT AirQo devices to provide insights on sensor health, device uptime, data completeness, and more.

Installation

pip install airqloudanalysis

Features

  • Sensor health analysis
  • Device uptime monitoring
  • Data completeness metrics
  • Battery performance analysis
  • Support for device-specific and AirQloud-level analysis

Noticable changes to this library

Library version change The library version holds various changes to the following functions;

print_devices_with_time_diff_flag_zero

This function has been replaced by the offline and online fuctions as they are more descriptive

Calculate_uptime

Altered to use start and end date to fill in the null while computing the collective uptime and now takes in two extra parameters: start and end date Function call is calculate_uptime(dataframe df, string start, string end)

Online devices list

This provides a variation of the timeLastPost function providing a list of online devices, their device numbers, time difference, and the airqlouds they belong to Function call is onlineDeviceList(dataframe df):

Offline devices list

This provides a variation of the timeLastPost function providing a list of offline devices, their device numbers, time difference, and the airqlouds they belong to Function call is offlineDeviceList(dataframe df):

Usage

These are the essential functions used both in general and device specific analysis

import airqloudanalysis as aqa

# Initialize with your API token
token = "your_api_token"
for google sheets
file_path = "file path"

airQlouds = ["Kampala", "Nairobi"]
or 
deviceNames = ['aq_g4_95', 'aq_23']

start = "2023-01-01"
end = "2023-01-31"
maintenenceDate = date(2025, 3, 1)


# Get device data
AQData = aqa.airqloudlist(file_path, excel_file, airQlouds, deviceNames)

#Initialisation of the data frame
final_df = aqa.process_data(AQData, start, end)

#List of devices and last post
device_time_diff = aqa.timeLastPost(AQData)

#List of online devices
onlineDeviceList = aqa.onlineDeviceList(device_time_diff)

#List of offline devices
offlineDeviceList = aqa.offlineDeviceList(device_time_diff)

#Calculating the uptime
final_uptime_data = aqa.calculate_uptime(final_df, start, end)

# Calculate uptime
uptime_data = aqa.calculate_uptime(processed_data, start, end)

Full Documentation

For complete documentation and examples, please visit: https://docs.google.com/document/d/1Dc4zQceYjoXDwmHKy99hp7x49kq8LtoSAXBA-1HMwA4/edit?usp=sharing

The repository for this library https://github.com/OlukaGibson/deviceAnalysisLibrary.git

License

This project is licensed under the terms of the license included in the repository.

Author

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

airqloudanalysis-0.0.735.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airqloudanalysis-0.0.735-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file airqloudanalysis-0.0.735.tar.gz.

File metadata

  • Download URL: airqloudanalysis-0.0.735.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for airqloudanalysis-0.0.735.tar.gz
Algorithm Hash digest
SHA256 7488a56b7f006464e3b73fa20cf3774cec3f8c6a272bb9fbf4806aa9f885c87d
MD5 07d47013b5dadd18c7d40e0aa4e4b061
BLAKE2b-256 18b81cc820d91e2d7745c05b0056d7ee7e0dc1e842cd81c93a65143c7d023167

See more details on using hashes here.

File details

Details for the file airqloudanalysis-0.0.735-py3-none-any.whl.

File metadata

File hashes

Hashes for airqloudanalysis-0.0.735-py3-none-any.whl
Algorithm Hash digest
SHA256 66f980027c80f310eea18fa7262244f171f57faeb5f75bb8268222a18656a14a
MD5 23e3138e8b8fce7b787130988d491f2a
BLAKE2b-256 285c0f2e3daf929f5c42f3c3ed8464ffeac76c3034db98b435688a471b21454c

See more details on using hashes here.

Supported by

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