Python Energy Data Analysis Utilities
Project description
pyedautils
Python Energy Data Analysis Utilities
What is it?
pyedautils is a python package that provides frequently used utility functions for the analysis and visualization of comfort and energy time series data. These functions reduce the complexity of the analysis and visualization of the data.
Installation
You can install the package from PyPi.org with:
pip install pyedautils
Functions
geopy.py
Helper funtions to find the coordinates from an address, convert lat/long values to swiss WGS84 coordinates and get the altitude from coordinates.
get_lat_long()
Returns latitude and longitude coordinates for the given address.
from pyedautils.geopy import get_lat_long
get_lat_long("Technikumstrasse 21, 6048 Horw, Switzerland")
# Out: [47.0143233, 8.305245521466286]
get_altitude_lat_long()
Returns altitude in meters above sea level for the given WGS84 coordinates. The opentopodata.org api gets used.
from pyedautils.geopy import get_altitude_lat_long
get_altitude_lat_long(47.0132975, 8.3059169)
# Out: 444.9
convert_wsg84_to_lv95()
Converts WGS84 latitude and longitude coordinates to Swiss coordinate system LV95.
from pyedautils.geopy import convert_wsg84_to_lv95
convert_wsg84_to_lv95(47.0132975, 8.3059169)
# Out: [2665945.104007165, 1207280.4252477456]
get_altitude_lv95()
Returns altitude in meters above sea level for the given LV95 coordinates. The geo.admin.ch api gets used.
from pyedautils.geopy import get_altitude_lv95
get_altitude_lv95([2665960.531, 1207281.985])
# Out: 442.6
season.py
get_season()
Get the season name out of a date for filter and grouping purposes.
from pyedautils.season import get_season
from datetime import datetime
get_season(datetime(2024,5,5))
#Out: 'Spring'
Default language of the returned strings is English. You can change that by passing the argument labels
:
get_season(datetime(2024,5,5), labels=["Frühling", "Sommer", "Herbst", "Winter"])
#Out: 'Frühling'
Disclaimer
The author declines any liability or responsibility in connection with the published code and documentation
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
Built Distribution
Hashes for pyedautils-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eee6497078953cb509988db866e1806dd9f349dc752fab7a3734c25ad2c405d |
|
MD5 | 45adb5dd7d406e034c4d90aaae6e2427 |
|
BLAKE2b-256 | cccaab4d27293f9455c20634c1bcdac3eaff7e9dc20c9e8bedf974b27ed7cd3c |