Giter Club home page Giter Club logo

weatherbrowser's Introduction

WeatherBrowser

Example of client-side geospatial visualization using TurfJS.

Description

This application uses Tornado incidence data for the past 60 years as recorded by the US Government to demonstrate the ability to plot, adjust, analyze, and aggregate geospatial information using a series of Javascript libraries. Due to the large dataset (almost 50,000 individual tornadoes with close to 100,000 geographic points) the map displays events one year at a time. For each year, an optional HeatMap can be enabled to display 'hot spots' of activity for that year. There is an additional overall HeatMap that shows hot spots over the entirety of the 60 year dataset. By clicking an individual US state on the map aggregate data is displayed for tornadoes in that state over time. All of the number-crunching is done client-side - the server only supplies the raw GeoJSON data. Due to security restrictions in the browser it is necessary to run this application using a web server like Jetty or Tomcat, or deploy it to a hosting provider like Heroku.

Usage

  1. Clone this repository. Ensure that you have Gradle available in your local environment.
  2. In a command prompt from the root directory of the repository execute gradle jettyRun.
  3. Open a browser and navigate to http://localhost:7777/WeatherBrowser/index.html. Since this application is very JavaScript-heavy it is recommended you use the latest builds of Chrome, Safari, or Firefox.
  4. When finished, stop the server in the command prompt with Ctrl-C

Tools & Frameworks

Data

Weather data is courtesy of the National Oceanographic and Atmospheric Administration (NOAA) USA Severe Weather Data Inventory (SWDI). Geographic data is courtesy of OpenStreetMap and Data Packaged Core Datasets.

Implementation Notes

  1. By default the embedded Jetty server does not enable GZIP compression. This is obviously silly for this application due to the very large amounts of textual (GeoJSON) data being transmitted. Enabling GZIP cuts the size of the tornado data file from 9.8 to 0.7 MB. However, in a development environment this data is exchanged locally, not over the wire, so it is a non-issue. If deploying to Heroku or another remote system it is highly recommended that GZIP/Deflate be enabled.
  2. The data from NOAA was originally in a CSV format which I preprocessed into GeoJSON using a quick-and-dirty Grails application. The code is not being published at this time since it is not intended for reuse but I will make it available if requested.
  3. While I did my best to ensure accurate translation and display of the data I cannot guarantee the original data source was 100% accurate. For instance, in the last few years of the dataset there are several storms that appear to zig-zag across the entire continental US which I believe to be erroneous data. Furthermore I truncated all storms to the first 20 geographic points reported to simplify things a bit (there were relatively few of these). If a specific storm you're looking for is missing or mislabeled I apologize, but remember that this application is not intended to be an authoritative source for this data.

Development

All code and scripts were developed on a 64-bit Ubuntu 15.04 platform and has been verified to function in the latest builds of Chrome, Firefox, and Safari in Ubuntu and OS X (10.10.4). Other OS/Hardware/Software combos may require modifications.

Licensing

This code is provided under the terms of the MIT license: basically you're free to do whatever you want with it, but no guarantees are made to its validity, stability, or safety. All works referenced by or utilized by this project are the property of their respective copyright holders and retain licensing that may be more restrictive.

weatherbrowser's People

Contributors

mike-plummer avatar

Watchers

Jeremy Schacherer 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.