Coder Social home page Coder Social logo

sophiecollard / london-air-ui Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 8.47 MB

A simple UI to view air quality data from londonair.org.uk, built with Elm 0.19 and Leaflet JS

License: Apache License 2.0

HTML 16.30% Elm 83.70%
airquality elm elm-lang leaflet leafletjs london airpollution air-pollution air-quality gis environmental-data environmental-monitoring

london-air-ui's Introduction

London Air UI

A user interface for viewing air quality data from London Air, built with Elm 0.19.1 and Leaflet JS.

A live version of the app can be found at https://london-air-ui.ams3.cdn.digitaloceanspaces.com/index.html.

Screenshot

Build

Development

From the root directory, run:

elm make src/Main.elm --output elm.js

In index.html, replace the following tag:

<script src="https://london-air-ui.ams3.cdn.digitaloceanspaces.com/elm.min.js.gz"></script>

with:

<script src="elm.js"></script>

Then, point your favourite browser to the location of index.html. Don't forget to undo this change before releasing to production!

Production

From the root directory, build the application with:

elm make src/Main.elm --output elm.js --optimize

Minify the resulting elm.js file with:

uglifyjs elm.js -o elm.min.js

If running this command for the first time, you may need to install uglify with npm install -g uglify-js.

Finally, compress the resulting elm.min.js file with:

gzip -k elm.min.js

Upload the resulting elm.min.js.gz to DigitalOcean spaces or similar. Don't forget to enable the CDN feature on your bucket and to configure your object metadata to include the following headers:

  • Content-Type: application/javascript
  • Content-Encoding: gzip

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.