Skip to content

shinysocks/direct_supply_kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Direct Supply Kata 2024 - Weather Data to Excel

Noah Dinan

overview

For this project, I wanted the user to be able to input as many locations as they wanted and recieve a table showing the weather for each location. This would make comparing weather in several locations trivial. I decided to use java for the project because of the easy to use Apache POI library for generating xlsx files, and because of its platform independence.

One unique aspect of this project is the "Should I go biking?" row which determines how suitable the weather in each location is for a ride based on amount of precipitation, wind speed, and temperature.

features

  • pulls data for each specified location
    • current weather information
    • high and low temperatures of the day
    • bikeability for the day
    • time of sunrise and sunset
  • outputs an excel sheet containing weather data

next steps

  • get current moon phase
  • write unit tests

usage

obtain or generate an API key for Google's Geolocation API

  • to generate a key, follow the instructions here

run with jarfile (Windows)

$env:GEOLOCATION_API_KEY="GOOGLE_GEOLOCATION_KEY" ; java -jar kata.jar "San Diego" "San Francisco" "Los Angeles" "Sacramento"

run with jarfile (Unix)

GEOLOCATION_API_KEY="GOOGLE_GEOLOCATION_KEY" java -jar kata.jar "San Diego" "San Francisco" "Los Angeles" "Sacramento"

run with gradle

GEOLOCATION_API_KEY="GOOGLE_GEOLOCATION_KEY" gradle run --args="milwaukee madison 'green bay' chicago antarctica"

Note

One benefit of using Google's Geolocation API is that locations can be as specific as a street address or as general as a continent!

projects used

  1. open-meteo api
  2. google's geolocation api
  3. apache poi
  4. LatLongToTimezone for timezone calculations (TimezoneMapper.java)
  5. WMO descriptions (descriptions.json)

screenshots

  • California has beautiful weather!

image

  • Some Milwaukee cities!

image

  • Comparing weather at both Direct Supply Locations with graceful exception handling

image

About

weather data to excel for many locations

Resources

Stars

Watchers

Forks

Languages