Giter Club home page Giter Club logo

java-volcano-analyzer's Introduction

Java Streams with Volcanoes

Objectives

  • Use higher-order functions to manipulate data about historical volcanic eruptions

Instructions

Write your code in VolcanoAnalyzer.java.

volcano.json contains a data set of 804 historical volcanic eruptions. Below is a sample of the data for each eruption.

  {
    "year": 1362,
    "tsu": "",
    "eq": "",
    "name": "Oraefajokull",
    "location": "Iceland-SE",
    "country": "Iceland",
    "latitude": 64,
    "longitude": -16.65,
    "elevation": 2119,
    "type": "Stratovolcano",
    "vei": 5,
    "agent": "T,F",
    "deaths": "220"
  }

Use java streams and any other higher-order functions to analyze the data in the following ways:

  1. Return the volcanoes that erupted in the 1980s.
  2. Return an array of the names of volcanoes that had an eruption with a Volcanic Explosivity Index (VEI) of 6 or higher.
  3. Return the eruption with the highest number of recorded deaths.
  4. Return the percentage of eruptions that caused tsunamis.
  5. Return the most common type of volcano in the set.
  6. Return the number of eruptions when supplied a country as an argument.
  7. Return the average elevation of all eruptions.
  8. Return an array of types of volcanoes.
  9. Return the percentage of eruptions that occurred in the Northern Hemisphere.
  10. Return the names of eruptions that occurred after 1800, that did NOT cause a tsunami, happened in the Southern Hemisphere, and had a VEI of 5.
  11. Return the names of eruptions that occurred at or above an elevation passed in as an argument.
  12. Return the agents of death for the ten most deadly eruptions.

Key for Agents of Death: Key for Agents of Death

References

Volcano data retrieved from: National Geophysical Data Center / World Data Service (NGDC/WDS): Significant Volcanic Eruptions Database. National Geophysical Data Center, NOAA. doi:10.7289/V5JW8BSH

java-volcano-analyzer's People

Contributors

jeff-lent avatar atique98 avatar jtklier avatar perrybranch-galvanize avatar hunaidbaig 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.