Skip to content

Boldar (Bolet Radar) A python script which scrapes weather records and tries to pinpoint the best area for mushroom hunting

License

Notifications You must be signed in to change notification settings

willblev/boldar

Repository files navigation

Boldar [Boldar is no longer functional as of September 30th 2022 due to the source of the weather data being deprecated]

Boldar (Bolet Radar) A python script which scrapes weather records and tries to pinpoint the best area for mushroom hunting in Catalunya. It then outputs the prediction as an interactive map.

The script will download .csv files from http://www.aemet.es/ to its current directory, and then it will parse them for information about precipitation, wind, temperature, etc. It uses this data to rank the best areas for mushroom hunting.

Example

After collecting weather data from dozens of locations around Catalunya, Boldar makes a prediction of how likely it is that mushrooms are growing in each area. It ranks them from best to worst and saves these values in a file called scores_predicted.txt that looks like this:

Sant Pau de Segúries, 941
Planoles, 687
Vall de Boí, 571
La Molina, 473
Tuixent, 356
Vilafranca del Penedes, 352
Sant Hilari, 331

Using these predictions, it creates an interactive map in a file called map_w_scores.html with colored pins on each location; green pins indicate the top areas where mushrooms are very likely to be growing, yellow pins means that there are probably mushrooms around, orange pins are for the less favorable areas, and lastly, red pins indicate places that you aren't likely to find any mushrooms at all. Pin colors assigned by the quartiles of the scores, which can be checked by hovering over the four pins in the ocean (bottom right).

Example of boldar prediction map

Hovering your mouse over a pin will display the name and score of the location.

Usage

In your terminal, navigate to the directory containing all of Boldar's files, then run boldar.py with python 2:

cd ~/Downloads/boldar-main/ && python2 boldar.py

It may raise an error like IOError: [Errno 2] No such file or directory: 'aemet_weather.20.09.2020.csv' the first few times that you run it: This is because the default parameters include several weeks' worth of weather data, but the Aemet website will only permit you to automatically scrape data from the last week. Therefore you need to run Boldar once or twice a week for a few weeks to accumulate sufficient daily weather reports before it will return any useful predictions.

Future features

In the future I would like to add:

  • static profiles for each location (altitude, forest types, soil types, etc.) to improve the predictive power of this model
  • static mushroom profiles for each species, as different types of mushrooms tend to grow best in different conditions and at different times of the year (perhaps pin color could indicate mushroom species)
  • update to python 3
  • find API to scrape multiple weeks' worth of data at once
  • parse doppler images with CV libraries to have higher resolution predictions

About

Boldar (Bolet Radar) A python script which scrapes weather records and tries to pinpoint the best area for mushroom hunting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published