Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sophiecollard/london-air-ui
A simple UI to view air quality data from londonair.org.uk, built with Elm 0.19 and Leaflet JS
https://github.com/sophiecollard/london-air-ui
air-pollution air-quality airpollution airquality elm elm-lang environmental-data environmental-monitoring gis leaflet leafletjs london
Last synced: about 1 month ago
JSON representation
A simple UI to view air quality data from londonair.org.uk, built with Elm 0.19 and Leaflet JS
- Host: GitHub
- URL: https://github.com/sophiecollard/london-air-ui
- Owner: sophiecollard
- License: apache-2.0
- Created: 2023-10-12T21:21:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-27T22:21:52.000Z (about 1 year ago)
- Last Synced: 2024-10-20T00:41:07.389Z (2 months ago)
- Topics: air-pollution, air-quality, airpollution, airquality, elm, elm-lang, environmental-data, environmental-monitoring, gis, leaflet, leafletjs, london
- Language: Elm
- Homepage:
- Size: 8.28 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# London Air UI
A user interface for viewing air quality data from [London Air](https://www.londonair.org.uk/LondonAir/Default.aspx), built with [Elm](https://elm-lang.org/) 0.19.1 and [Leaflet JS](https://leafletjs.com/).
A live version of the app can be found at [https://london-air-ui.ams3.cdn.digitaloceanspaces.com/index.html](https://london-air-ui.ams3.cdn.digitaloceanspaces.com/index.html).
![Screenshot](screenshot.png)
## Build
### Development
From the root directory, run:
```sh
elm make src/Main.elm --output elm.js
```In `index.html`, replace the following tag:
```html
```
with:
```html
```
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:
```sh
elm make src/Main.elm --output elm.js --optimize
```Minify the resulting `elm.js` file with:
```sh
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:
```sh
gzip -k elm.min.js
```Upload the resulting `elm.min.js.gz` to [DigitalOcean spaces](https://www.digitalocean.com/products/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`