Giter VIP home page Giter VIP logo

ufos's Introduction

UFO Sightings with JavaScript

Project Overview

My best friend, Dana, is a journalist who is at a point in her career where she has the freedom to choose the topic she wants to write about. Since she's been a UFO enthusiast for as long as she can remember, she's decided to write about UFO sightings. For this assignment she has a JavaScript file filled to the brim with sighting information. Since I'm a JavaScript whiz and know how to utilize its visual functionality, Dana has enlisted my help. I plan to use JavaScript to display Dana's sightings file as a table. However, since there is so much data, sifting through it without any adjustments would be a challenge. Thankfully, JavaScript provides a way to manipulate the data by adding filters. It's a little tricky to add more than one filter but I'm up to the challenge. Additionally, Dana and I will be working together to put everything online in a tidy HTML page - her article, the table of data, and easy-to-use filters to fine tune the results. Dana and I are looking forward to seeing the website come to life!

Resources

  • Data Sources: data.js file
  • Software and Tools: JavaScript, HTML/CSS, Bootstrap, VS Code & Git Bash

Challenge Deliverable and Results

The advanced website looks like this:

  • There are now five list elements for filtering in the index.html file: date, city, state, country, and shape.

  • I added an event listener to detect changes to each filter element in the app.js file. When a web visitor enters their input into any of these filter elements, the website detects the change and calls the updateFilters() function.

  • The updateFilters() function saves the element, value, and the id of the filter that was changed based on the web visitor's input and calls the filterTable() function.

  • The filterTable() function loops through all of the filters, keeps any data that matches the filter values, and rebuilds the displayed table.

  • Below are website screenshots of examples that demonstrate what happens to the table results when you input search criteria.

    • for a date of 1/7/2010:

    • for a date of 1/8/2010 and state of Texas (tx):

Challenge Summary

I think Dana and I have a lot to be proud about with how this website turned out! However, the dataset it relies on is very limited. Since it only emcompasses sightings for the first two weeks of January 2010, a major drawback to this new design is it doesn't take much filtering to yield no results.

Two recommendations for further development are:

  1. Adding a tailored message when no results are found for various search criteria.
  2. A current limitation of the search filters is they are case sensitve. Therefore, a key feature for further development would be to allow capitalized text, especially for the city and state fields.

ufos's People

Contributors

christybell avatar

Stargazers

 avatar

Watchers

 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.