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 meteo

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

# Weather forecast #################################################################################

# Print some help:
meteo.print_help_uurverwachting()


# Read weather-forecast data from file:
# data = meteo.read_json_file_uurverwachting('UurVerwachting1.json', full=True)  # Option 1: HARMONIE/HiRLAM (48 (42?) hours)
# data = meteo.read_json_file_uurverwachting('UurVerwachting2.json')  # Option 2: GFS (4/10 days)
# data = meteo.read_json_file_uurverwachting('UurVerwachting2.json', full=True)  # Option 2, with ALL columns

# Get weather-forecast data from server:
# data = meteo.read_json_url_uurverwachting(myKey, myLocation, model='HARMONIE')  # Option 1: HARMONIE/HiRLAM
data = meteo.read_json_url_uurverwachting(myKey, myLocation)  # Option 2 (default): GFS
# data = meteo.read_json_url_uurverwachting(myKey, myLocation, full=True)  # Option 2, with ALL columns

# pd.set_option('display.max_rows', None)  # Print all rows of a Pandas dataframe
# data = meteo.remove_unused_hourly_forecast_columns(data)
print(data)


# Sun forecast #####################################################################################

# Print some help:
meteo.print_help_zonactueel()

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

# Get Meteoserver Sun data from the server for the given location (and key):
current, forecast = meteo.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)

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.5.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

meteoserver-0.0.5-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meteoserver-0.0.5.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.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.5.tar.gz
Algorithm Hash digest
SHA256 df115d7ea06da39495696767f7c78ace0feb36128b375458cad56a77e308b3b1
MD5 dd1885e6cae9531fff3e41335de772b0
BLAKE2b-256 d8da4d56f50abd7a79fd3ddbc1d8d1cb959a000a23ed1bd2d742338041cc7b97

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meteoserver-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bdd22ce952c7a6c3aaf94b128eb73d0528b65ffffc0ef28d797cda1bc5962584
MD5 041eefc0112580000ac0f7dda6af7e0a
BLAKE2b-256 4e9379f5a4f08087605908f849ef263c7177078f788fcf0f585ade5ae86a9835

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