Skip to content

chrisman/tiwh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Day In Weather History ⛅️

This API will return historical weather data from metaweather for today's date given a Where On Earth ID

About

This API wraps the metaweather API and caches searches. Existing searches will be returned from the cache instead of hitting the metaweather API again.

A search consists of a WOEID. Today's date will be provided by the server.

The return object will be the weather for today's date up each year up to five years ago where possible. ("Most location have data from early 2013 to 5-10 days in the future." -https://www.metaweather.com/api/)

Use Cases

  • See small scale trends in temperature / weather changes

Usage

wip

  • GET api/v1/locations/: Get a list of all local WOEID / description (city name) pairs
  • GET api/v1/search/<string>: Where is the name of a city, return its local OEID, or return it from metaweather
  • GET api/v1/weather/<id>: Where is an OEID, return the historical weather data from cache if avaliable, else from metaweather

Development

Dependencies

  • Ruby version 2.7.1

Data Configuration

  • create the database: rake db:migrate

  • seed the db: rake db:seed

Tests

  • rake test

Roadmap

v1:

  • fetch historical data from metaweather with a WOEID, and cache the result

  • Cache / retrieve WOEIDs based on a search string

  • able to view all cached locations (WOEIDS + descriptions) and searches (locations + date)

  • return searches from cache when possible

  • tests for all routes and controllers

  • generated Postman docs for api

Resources

About

Today In Weather History

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published