This project visualizes shade data from GPX files, creating an interactive map showing sunny and shady sections of walks.
You can view the latest generated shade map at: https://wjhrdy.github.io/shady-walks/
The map is automatically updated daily and whenever changes are pushed to the main branch.
- Visualizes sunny and shady sections of walks
- Calculates shade percentage for each walk
- Shows duration of time spent in sun and shade
- Interactive map with popup information for each walk
This project uses Poetry for dependency management and packaging. Follow these steps to set up your development environment:
-
First, make sure you have Poetry installed. If not, install it by following the instructions on the official Poetry website.
-
Clone this repository:
git clone https://github.com/wjhrdy/shady-walks.git cd shady-walks
-
Install the project dependencies using Poetry:
poetry install
-
Activate the virtual environment created by Poetry:
poetry shell
Now you're ready to run the script and develop the project!
Once you've set up your environment with Poetry, you can run the script like this:
-
Ensure you're in the project directory and your Poetry virtual environment is activated.
-
Place your GPX files in a directory named 'gpx' within the project directory.
-
Run the script:
poetry run python shade_map_visualizer.py
-
Open the generated 'index.html' in a web browser to view your shade map.
To capture the shade information for your walks, you can use the GPSLogger app on Android. Here's how to set it up and use it:
-
Download and install GPSLogger from the Google Play Store.
-
Open GPSLogger and go to the settings (three dots in the top right corner > Settings).
-
Under "Logging Details", ensure that:
- "Log to GPX" is turned on
- "Log to KML" and "Log to Plain Text" can be turned off
-
Under "Performance", set:
- "Time before logging" to 0 seconds
- "Distance filter" to 0 meters
- This ensures that points are logged as soon as you tap the button
-
Under "Auto send, email and upload", set up your preferred method to get the GPX files off your phone (e.g., auto-email, Dropbox, etc.)
-
Before starting your walk, set up the annotation view:
- Tap the three dots in the top right corner and select "Annotation markers"
- Add two markers: one for "sun" and one for "shade"
- This will create quick-access buttons for sun and shade annotations
-
To start logging your walk:
- Tap the big green play button to start GPS logging
- When you enter a shaded area, tap the "shade" marker in the annotation view
- When you exit the shaded area, tap the "sun" marker
- Continue this process throughout your walk
- When finished, tap the big green button again to stop logging
-
Use your chosen method to get the GPX file off your phone and onto your computer
-
Place the GPX file in the 'gpx' directory of this project
Tips for better data collection:
- Try to annotate as soon as you enter or exit a shaded area for the most accurate results.
- If you forget to annotate a transition, you can add a waypoint at your current location with the correct annotation (sun or shade) as soon as you remember.
- For best results, try to walk at a consistent pace, especially when transitioning between sun and shade.
- The annotation view makes it much quicker and easier to log transitions - use it to your advantage!
Remember: The more consistently you log the transitions between sun and shade, the more accurate your shade map will be!
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please ensure you have updated tests as appropriate and your code follows the project's coding style.