Skip to main content

A Python module to obtain and read Dutch weather data from Meteoserver.nl

Project description

Meteoserver

A Python module to obtain and read Dutch weather data from Meteoserver.nl. The code is being developped by Marc van der Sluys of the department of Sustainable energy of the HAN University of Applied Sciences in Arnhem, the Netherlands.

Installation

This package can be installed using pip install meteoserver. This should automatically install the dependency packages pandas and requests, if they haven't been installed already. If you are installing by hand, ensure that these packages are installed as well.

You will need to obtain a (free) account and API key at Meteoserver.nl to download data from the Meteoserver API.

Example use

"""Example Python script using the Meteoserver module."""

import meteoserver as ms

myKey = 'a123456789'    # My Meteoserver API key - put your OWN key here!
myLocation = 'De Bilt'  # My location

# Read a Meteoserver JSON file from disc:
# current, forecast = ms.read_json_file_zon('ZonActueel.json')

# Get Meteoserver Sun data from the server for the given location (and key):
current, forecast = ms.read_json_url_zon(myKey, myLocation)

# Print the current-weather and forecast dataframes:
print("\nCurrent Sun/weather observation from a nearby station:")
print(current)
print("\nSun/weather forecast for the selected location/region:")
print(forecast)

# Print the forecasts in a nice format:
print("\nSelected Sun/weather forecast variables in full:")
print("%10s  %16s  %4s  %3s   %3s  %3s  %3s  %3s" % ('UNIX time', 'Date/time CET', 'Rad', 'Sun', 'Cld', 'LCl', 'MCl', 'HCl'))
for row in forecast.iterrows():  # Makes (index, Series) pairs out of row
    # idx = row[0]  # Index
    ser = row[1]  # Data series

    # if(float(ser.elev) > 0 and int(ser.sd)==0):
    print("%10i  %16s  %4i  %3i   %3i  %3i  %3i  %3i" %(int(ser.time), ser.cet, int(ser.gr), int(ser.sd), int(ser.tc), int(ser.lc), int(ser.mc), int(ser.hc)))

Meteoserver pages

  • Pypi: Meteoserver Python package
  • GitHub: Meteoserver source code

Author and licence

References

  • Data, API key and API documentation can be obtained from Meteoserver.nl

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

meteoserver-0.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

meteoserver-0.0.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file meteoserver-0.0.2.tar.gz.

File metadata

  • Download URL: meteoserver-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.10

File hashes

Hashes for meteoserver-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d56bcbe4b62313dec75c51404ce072131adc8435403bbd158ce862eb8a83b45a
MD5 75de3cd2df4f2010fb7f02b7bd09bc8b
BLAKE2b-256 d32dc097add730d548953d90261632645b93adaa6b40001ede23f353d192eec7

See more details on using hashes here.

File details

Details for the file meteoserver-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: meteoserver-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.10

File hashes

Hashes for meteoserver-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b065b025398bce539b1b7d974064f1f55931cdf8176538b1193082753592cda
MD5 ac660aed122419985c53836d6bf8270a
BLAKE2b-256 a51efb3f9ae3d93aa1492a2e1612e9a5e31d7dda9df09cf3e12ce7983943125a

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