Skip to content

Made an interactive UFO sighting database website, searchable by sighting date

Notifications You must be signed in to change notification settings

Uc71/Filterable-UFO-Table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Filterable UFO Table

My aim in this project was to let Ufologists easily study UFO sighting data for the period 1/1/2010 through 1/13/2010.

INSTRUCTIONS: To open this project, clone or download this repo. Then, click on "UFO.html" in your file explorer. Here is the initial appearance of the page: image image Your interaction is required in the "Filter Search" box in the top left of the table, immediately below the outer space picture. The white box with "Enter a Date" immediately above it is the form, into which you will type the date you wish to see records for. Only dates in the range 1/1/2010 to 1/13/2010, inclusive, will get results. When typing into the form, use only numbers and do not use any extra zeroes. For example, for the 7th day of January, type "1/7/2010". Use the format X/X/XXXX. Type out year numbers in full. When you have typed in your date of interest, press the "Filter Table" button immediately below the form in order to return sightings on only the desired date. Here are examples of results for the 1st and last dates of the timeframe: image image If you want to see the table in its original form, without any filtering, simply refresh the page.

DESCRIPTION: I looked through the data file and observed that it was a list of dictionaries. I made a for loop to run through each dictionary and put all of its data into a row in the table, which I had made in the HTML. Then, once the table was full, I made event handlers for the form and the filter button and made a function to run when either handler was given an event. I set the value property of the form input to be a variable and used an arrow function inside of a filter function to make a new, filtered dataset for any input value. I then cleared the old table body and made a new table with a new row in it for each of the filtered data entries. A new table completely replaces the previous one each time the code is run.

About

Made an interactive UFO sighting database website, searchable by sighting date

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published