Giter Site home page Giter Site logo

doerrfeldbill / sunrise Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 247 KB

A super simple website that uses open data APIs to find the sunrise time in your local area. Essentially a clone of sunset repo.

Home Page: https://doerrfeldbill.github.io/sunrise/

HTML 25.94% JavaScript 49.03% CSS 25.03%

sunrise's Introduction

sunrise ๐ŸŒ„

sunrise is a super simple website that uses open data APIs to display the sunrise time in your local timezone. I built it to demo an introductory lesson on practical API use cases. This is a personal project and not intended for commercial use. View it here.

About

sunrise demonstrates how to use simple HTTP GET calls to open data APIs. First, the code calls the GeoIPLookup.io API to return lattitude and longitude coordinates based on the caller's IP address. Next, it uses passess these coordinates as parameters in a call to the Sunrise-Sunset API. The Sunrise-Sunset API returns the UTC timestamp for the sunrise time. Lastly, sunrise converts UTC into local time. It uses some JS functions to do that, and some janky slice methods to output what we want to see.

Disclaimer

Since sunrise depends on the caller's IP address, mobile use may return an incorrect time. Code is not elegant, it's just for sample purposes.

sunrise's People

Contributors

doerrfeldbill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.