The Weather Database project creates a MySQL database to ingest and manage weather station data from multiple sources. Included in
the repository are the schema model and everything needed to generate a weather station database. The wxdb
package is able
to interact with the database and grab metadata and station data from multiple sources. Currently, the sources supported are:
Through the configuration file, wxdb
can be setup to automatically download all desired stations for a given client and source.
It is preferable to use a Python virtual environment to reduce the possibility of a dependency issue.
-
Create a virtualenv and activate it.
virtualenv wxdbenv source wxdbenv/bin/activate
Tip: The developers recommend using an alias to quickly turn on and off your virtual environment.
-
Clone WeatherDatabase source code from the USDA-ARS-NWRC github.
git clone https://github.com/USDA-ARS-NWRC/WeatherDatabase.git
-
Change directories into the
WeatherDatabase
directory. Install the python requirements. After the requirements are done, installWeatherDatabase
.cd WeatherDatabase pip install -r requirements.txt python setup.py install
To install in developer mode pip install -e .
To make management easier, the authors recommend using Docker which aides in the management, deployment, and automation of downloads to the database. The official Docker image is found at the docker_weather_database.