Giter Site home page Giter Site logo

macf2021 / smogwatch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mackuba/smogwatch

0.0 0.0 0.0 132 KB

watchOS app for checking air pollution levels, created for my blog post series

Home Page: https://mackuba.eu/2018/10/29/watchkit-adventure-0-intro/

License: Do What The F*ck You Want To Public License

Ruby 3.46% Swift 96.54%

smogwatch's Introduction

SmogWatch

This is an app I'm building for my blog post series "WatchKit Adventure". Its goal is to display the level of PM10 smog pollution (fetched from a local monitoring station) on the Apple Watch's watch face. Initially it only works for a single preset station in Kraków, Poland.

The second goal is for me to learn programming for watchOS and also get some experience that I can share in the blog posts :)

Installation & Running

If you want to try out the app, clone the repo (or download a zip) and open it in Xcode. There are currently no external dependencies, so just build the project.

Running a watch app in the simulator is about 100x easier than getting an actual device to cooperate, so try that first. Then, to run on the real watch, you will probably need to edit at least the developer team and the app ID. If you manage to run it, let me know what else you needed to do :)

The app currently uses http://monitoring.krakow.pios.gov.pl for the data and has a hardcoded ID of PM10 parameter on the Kurdwanów station. If you want a different station (as long as it's from the Małopolska monitoring system) then open the site in the browser, select only PM10 parameter only on one selected station, load the data and check in the web inspector what parameter was sent in the request. The query in KrakowPiosDataLoader.swift is the place you need to update.

Yup, it's all very very rough right now - did I ever say this was a finished app? It's basically version 0.0.1 :)

It's possible that there are other regional monitoring systems in Poland that use the same API, so let me know if you find one.

Complications

The part that's working so far is complications. Not all families are supported, currently Modular Small works best since that's what I primarily use (on Modular or Siri watch faces). If you really want to use a different complication that isn't supported yet, look in ComplicationHandler.swift, and also enable the complication family in the target settings.

Main UI

The app itself has currently no UI whatsoever, so if you see a black screen, don't worry, it's not broken. First things first, you know...

Credits

Copyright © 2019 Kuba Suder. Licensed under WTFPL License.

I've made the code available under WTFPL because the whole idea is for other people to be able to learn this stuff together with me and reuse any pieces they need from my app to build their own. So take what you need and build cool shit, and don't worry about licences. Of course if you want to mention me somewhere, I'll be very happy :)

smogwatch's People

Contributors

mackuba 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.