Skip to content

Installation

With pip

pip install riweather

The basic installation method does not install the packages required for plotting stations with riweather.plot_stations. If you want to make plots, install the optional plots dependencies:

pip install "riweather[plots]"

Within a pipx Jupyter environment

If you have a pipx environment for local development with Jupyter, then you can inject riweather into that environment and it will be available to your notebooks.

pipx inject jupyter riweather

To update riweather to the latest version published on PyPI, you can uninject it (uninstalling it from your environment) and inject it again:

pipx uninject jupyter riweather
pipx inject jupyter riweather

If data appears to be missing for the current year

If you are trying to fetch weather data for a certain year (usually it will be the current year) and you are receiving no results, it could be that the station metadata that is shipped with the riweather package needs to be refreshed. See the CLI reference page for more details about why this needs to be done. In a nutshell, you can refresh it manually by running the following from the command line:

riweather download-metadata -d tmp_riweather_data
riweather rebuild-db -s tmp_riweather_data

This may take a few minutes to run. After it is complete, you can delete the tmp_riweather_data directory that was created.