{"id":15115997,"url":"https://github.com/lds133/weather_landscape","last_synced_at":"2025-04-12T21:18:52.836Z","repository":{"id":257800145,"uuid":"860493834","full_name":"lds133/weather_landscape","owner":"lds133","description":"Visualizing Weather Forecasts Through Landscape Imagery","archived":false,"fork":false,"pushed_at":"2025-03-14T10:16:04.000Z","size":6600,"stargazers_count":1663,"open_issues_count":1,"forks_count":77,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-12T21:18:49.406Z","etag":null,"topics":["eink","esp32","micropython","openweathermap-api","python3","weather-forecast"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lds133.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-20T14:38:12.000Z","updated_at":"2025-04-12T00:53:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c50a26e-fec1-4bd0-94da-932f1d535334","html_url":"https://github.com/lds133/weather_landscape","commit_stats":null,"previous_names":["lds133/weather_landscape"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lds133%2Fweather_landscape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lds133%2Fweather_landscape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lds133%2Fweather_landscape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lds133%2Fweather_landscape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lds133","download_url":"https://codeload.github.com/lds133/weather_landscape/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631804,"owners_count":21136569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eink","esp32","micropython","openweathermap-api","python3","weather-forecast"],"created_at":"2024-09-26T01:44:07.071Z","updated_at":"2025-04-12T21:18:52.816Z","avatar_url":"https://github.com/lds133.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Weather as Landscape\nVisualizing Weather Forecasts Through Landscape Imagery\n\n![house](pic/house.png)\n\nTraditional weather stations often display sensor readings as raw numerical data. Navigating these dashboards can be overwhelming and stressful, as it requires significant effort to locate, interpret, and visualize specific parameters effectively.\n\nViewing a landscape image feels natural to the human eye. The calming effect of observing landscape elements reduces stress and requires minimal effort, allowing for a more relaxed visual experience.\n\nThe method below demonstrates how to encode weather information within a landscape image, with no or minimal reliance on numerical data.\n\n\n\n## Encoding principles\n\nThe landscape depicts a small house in the woods. The horizontal axis of the image represents a 24-hour timeline, starting from the current moment on the left, marked by the house, and extending to the conditions of the next day on the right. Various landscape elements distributed along the vertical axis symbolize weather events and conditions. The further an event is from the present, the farther it is positioned to the right in the image.\n\n\n![encode](pic/encode.png)\n\n\nThe following information can be encoded within the landscape image:\n\n- Time markers to simplify timeline navigation:\n  - Sunrise and sunset times\n  - Noon and midnight\n- Weather forecast information:\n  - Wind direction and strength\n  - Temperature fluctuations\n  - Maximum and minimum temperature values\n  - Cloud cover\n  - Precipitation\n- Current weather conditions:\n  - Temperature\n  - Atmospheric pressure\n- Non weather events:\n  - Birthdays\n  - Holidays\n  \n\n\n## Implementation\n\nThe image generation code is written in [Python](https://www.python.org/) using the [Pillow](https://python-pillow.org/) library and is based on data from [OpenWeather](https://openweathermap.org/). The image is designed specifically for use on a 296x128 E-Ink display. The code tested on Python 3.9.\n\n\n| Event image | Description |\n|----------|------------|\n|![example](pic/sun_00.png)| Sunrise | \n|![example](pic/moon_00.png)| Sunset |\n|![example](pic/cloud_30.png)| Cloud cover |\n|![example](pic/house_00.png)| Current time position|\n|![example](pic/flower_00.png)| Midnight |\n|![example](pic/flower_01.png)| Midday |\n|![example](pic/sprites_south.png)| South wind |\n|![example](pic/sprites_east.png)| East wind |\n|![example](pic/sprites_west.png)| West wind |\n|![example](pic/sprites_north.png)| North wind |\n|![example](pic/rain.png)| Rain|\n|![example](pic/snow.png)| Snow|\n|![example](pic/pres_high.png)| High atmospheric pressure |\n|![example](pic/pres_norm.png)| Normal atmospheric pressure |\n|![example](pic/pres_low.png)| Low atmospheric pressure |\n\nThe taller the trees, the stronger the wind is expected to be. A mix of different tree types in the forest indicates an intermediate wind direction.\n\n\n\n## Examples\n\n|\u0026nbsp;Landscape\u0026nbsp;image\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;| Description |\n|----------|------------|\n|![example](pic/weather_test.bmp)| It’s around noon, with clear skies and a few clouds expected. A moderate north wind will develop overnight. Temperatures are currently rising but will begin to fall after sunset, reaching their lowest point before sunrise. During this time, the wind is expected to shift to the northeast.|\n|![example](pic/test_20240903_043826.bmp)| The sun is rising and it will be a hot sunny day with a light southeast breeze. The temperature will remain high even after sunset, and the wind will shift to the east, becoming stronger throughout the evening.|\n|![example](pic/test_09B0B1083315.bmp)| It will be cold and rainy throughout the day and night. The south wind will shift to the northwest overnight.|\n\n\n## How the landscape changed during the day\n\n![Dynamic](pic/dynamic.gif)\n\n\n\n## Running the code\n\n\n#### Preparing environment Linux\n```\n./makevenv.sh\n```\n```\nsource .venv/bin/activate\n```\n\n#### Preparing environment Windows\n```\nmakevenv.bat\n```\n```\n.venv/Scripts/Activate\n```\n\n#### Image creation test\n\nUpdate **OWM_KEY** variable in the `secrets.py` with your OpenWeather API key.\n\n(optional) Change the coordinates in `secrets.py` to your location.\n\n```\npython run_test.py\n```\n\n#### Run server\n\n```\npython run_server.py\n```\n\n\n\n\n## Hardware\n\n\u003c!-- ![2.9inch e-Paper Module](pic/eink.jpg) --\u003e\n![Setup](pic/hardware.jpg)\n\nThe hardware setup includes an [ESP32 development board](https://www.adafruit.com/product/3269) and [2.9inch E-Ink display module](https://www.waveshare.com/2.9inch-e-paper-module.htm). Currently, the setup only displays an image sourced from the internet, updating every 15 minutes. It is uncertain whether the image generation code can be adapted for use with MicroPython on the ESP32 at this time.\n\n[More information](esp32/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flds133%2Fweather_landscape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flds133%2Fweather_landscape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flds133%2Fweather_landscape/lists"}