Skip to main content

Easy access to geographic, meteorologic and photovoltaic performance data/services.

Project description

The 'Daaayonearth' library contains three classes: Location, TimeZone and EnvConditions. These provide easy access to geographical, meteorological and photovoltaic performance data/services, namely:

  • the (latitude, longitude) tuple belonging to a specific address / location string (geocoding)

  • the timezone belonging to a specific location (at a given date)

  • the typical environmental conditions belonging to a day at a specific location & date, including:

  • air temperature

  • air pressure

  • air humidity

  • wind speed

  • wind direction

  • sun height

  • solar irradiance

  • maximal photovoltaic performance

For each of said parameters there is a function as well as a belonging plot available, which provide the course of said parameter over the chosen day.

Examples

	#import from daaayonearth
	import daaayonearth
	from   daaayonearth import Location, TimeZone, EnvConditions


	#import from standard library
	from   datetime     import datetime as Datetime
	from   datetime     import date     as Date


	#set application name
	daaayonearth.UserAgentNameS = "DaaayExampleApp"


	#get (latitude, longitude) tuple from address string
	deu = Location(  "Willy-Brandt-Str., 10557 Berlin" )                             # ==> (52.5202262, 13.3704874)


	#get timezone (Python tzfile) belonging to location
	tzDeu = TimeZone( deu )                                                          # ==> tzfile('Europe/Berlin')


	#convert a date to another timezone
	date = Datetime(2021, 11, 1, 20, 40, 0, tzinfo=tzDeu)                            # ==> 2021-11-01 20:40:00+01:00
	date.astimezone( TimeZone("Pennsylvania Ave. NW, Washington, DC 20020, USA") )   # ==> 2021-11-01 15:40:00-04:00


	#get the typical temperature at 12 o'clock 
	#in the Willy Brandt Street, Berlin - on the 2th of November (year is ignored)
	envConds = EnvConditions( Location("Willy-Brandt-Str., 10557 Berlin"), Date(2021, 11, 2) )
	envConds.functionsD["T(2m) [°C]"](12 * 3600)                                     # ==> 5.03


	#get a matplotlib figure of the belonging course of temperature for said location/day
	envConds.getFigureOf( "T(2m) [°C]" )                                             # ==> plot (course of temperature)


	#get the list of available parameters (for envConds.functionsD[...] and envConds.getFigureOf(...))
	list( envConds.functionsD.keys() )   # ==> [ 'T(2m) [°C]', 'Humidity [%]', 'Irradiance [W/m^2]', 
							 #       'WindSpeed(10m) [m/s]', 'WindDirection(10m) [°]', 
							 #       'Pressure(0m) [Pa]', 'PvPower [W]', 'SunHeight [°]' ]

      #it is also possible to setup the environment conditions 'manually' - using the 'auto' parameter
      #as the Tmy-part is far less time consuming than the Pvp-part, this e.g. can be used to minimize 
      #waiting times
      envConds = EnvConditions( "Willy-Brandt-Str., 10557 Berlin", "11-02", auto=False )

      envConds.loadTmy()
      envConds.processTmy()    #after this, one already has access to all functions/figures 
                               #but 'SunHeight [°]' and 'PvPower [W]' 
      
      envConds.loadPvp()       #the Pvp-block needs about 5 times more time (e.g. some 20s!)
      envConds.processPvp()

      envConds.cleanUp()       #do not forget to clean up - also if you just use the Tmy-part

If you use this library you might ('under the hood') use data and/or services connected with 'OpenStreetMap', 'Nominatim' and/or 'PVGIS' - please find more informations concerning this topic in the LICENSE text!

Further infomations and links also can be found on my homepage https://www.blackward.de

Have Fun!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

daaayonearth-0.75-py2.py3-none-any.whl (16.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file daaayonearth-0.75-py2.py3-none-any.whl.

File metadata

  • Download URL: daaayonearth-0.75-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for daaayonearth-0.75-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 aab00e60bf12fbe0858ec58a7e2bbea2c1f69bfb1bfc57fdc77c6cb66bd19d42
MD5 92e0e16616d9e9f695c02a5b657ccb05
BLAKE2b-256 5cef27503c64ca513d7503df7749d428b7337e67982af27593a5b03b2a510351

See more details on using hashes here.

Supported by

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