Skip to main content

A robust Python client for interacting with the Newcastle Urban Observatory API (v1.1). This package provides a comprehensive interface for accessing and analyzing urban sensor data with built-in caching, configuration management, and data analysis capabilities.

Project description

Urban Observatory API Client

A robust Python client for interacting with the Newcastle Urban Observatory API (v1.1). This package provides a comprehensive interface for accessing and analyzing urban sensor data with built-in caching, configuration management, and data analysis capabilities. Package documentation, installation instructions and examples can be found at https://carrowmw.github.io/uoapi/

Installation

Using pip

pip install uoapi

Using Docker

Pull and run the Docker image:

docker pull carrowmw/uoapi:latest
docker run carrowmw/uoapi:latest

Quick Start

from uoapi import api_client
# Initialize the client
client = api_client.APIClient()
# Get sensor data
data = client.get_raw_sensor_data(
    theme="Traffic",
    last_n_days=7
)
# Analyze the data
analysis = client.analyze_json(theme="Traffic")

Key Features

  • Flexible Configuration: Support for YAML-based configuration and runtime parameter updates
  • Intelligent Caching: Built-in caching system with customizable retention periods
  • Comprehensive Data Access:
    • Sensor metadata retrieval
    • Raw sensor data access
    • Theme and variable information
    • Spatial and temporal filtering
  • Error Handling: Robust error handling and logging
  • Data Analysis Tools: JSON structure analysis and data formatting utilities
  • DataFrame Export: Easy conversion of metadata to Pandas DataFrames

Use Cases

  • Urban data analysis
  • Environmental monitoring
  • Research and data collection
  • Smart city applications
  • Sensor network analysis

Technical Highlights

  • Type-hinted for modern Python development
  • Decorator-based caching system
  • Dataclass-driven configuration
  • Pandas integration for data manipulation
  • Comprehensive logging system
  • RESTful API interaction with request retry handling The package is designed for researchers, data scientists, and developers working with urban sensor data, providing a clean and intuitive interface to the Urban Observatory's extensive sensor network.

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

uoapi-0.2.3.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

uoapi-0.2.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file uoapi-0.2.3.tar.gz.

File metadata

  • Download URL: uoapi-0.2.3.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.6.0

File hashes

Hashes for uoapi-0.2.3.tar.gz
Algorithm Hash digest
SHA256 ee1b5f7869137b809378b7c9312e242203314e3b7d2e33f5a8f608bcdedf3e58
MD5 9687f6695fd819f5602c733aabb8982a
BLAKE2b-256 b02a3128f1ec07bde95b6f78ee9b5f4d41c1694bad9b5a3c91b89c1ce5a5d33a

See more details on using hashes here.

File details

Details for the file uoapi-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: uoapi-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.6.0

File hashes

Hashes for uoapi-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a1844b4da24ff07a8ce82ec37987338debf349b60103fb9e8567ea50a4f7b70
MD5 5671cccdfbedd6ce79683a854815f298
BLAKE2b-256 3aa98458a0492631e17ffa46875b1af260b60d1977c12e5b03dfda5b3c2aef57

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