Main Chart

MainChart

body {

font-family: Arial, sans-serif;

margin: 0;

padding: 0;

}

header {

background-color: #222;

color: white;

padding: 10px 20px;

}

nav a {

color: #ddd;

margin: 0 10px;

text-decoration: none;

font-weight: bold;

}

nav a:hover {

color: #fff;

}

.container {

padding: 20px;

}

.filters {

margin-bottom: 15px;

}

mainChart {

height: 400px;

width: 100%;

}

map {

height: 500px;

margin-top: 20px;

}

secondaryChart {

height: 400px;

width: 100%;

margin-top: 20px;

}

.chart-container {

display: flex;

flex-direction: column;

}

@media (min-width: 768px) {

.charts-row {

display: flex;

justify-content: space-between;

}

.chart {

flex: 1;

margin: 10px;

}

}

Do Certain Areas Have Higher Concentrations Of Sightings

Home

Charts

Map

Additional Visuals

Dashboard Overview

to

Distribution of Sightings Duration

Common Sightings Shapes

Sighting Summaries Word Cloud

// Mock Data Sets

const sightingsData = [

// Example: {id: 1, latitude: 40.7128, longitude: -74.0060, shape: 'Disc', duration: 15, time: '2023-05-10T22:00:00', summary: 'Bright light over NYC'},

// Include realistic entries here

];

const locationData = [

// Example: {region: 'North', count: 20},

];

let filteredSightings = sightingsData.slice();

// Initialize the map

const map = L.map('map').setView([39.5, -98.35], 4);

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {

attribution: '© OpenStreetMap contributors'

}).addTo(map);

// Initialize charts

let amChart = null;

am5.ready(function() {

amChart = am5.Chart.new(document.getElementById("mainChart"), {

layout: am5.LayoutVertical,

// Additional configuration

});

});

// Function to update the map with bubbles

function updateMap(data) {

map.eachLayer(function (layer) {

if (layer instanceof L.CircleMarker) {

map.removeLayer(layer);

}

});

data.forEach(sighting => {

const circle = L.circleMarker([sighting.latitude, sighting.longitude], {

radius: Math.sqrt(sighting.count || 1) * 5,

fillColor: 'blue',

color: 'darkblue',

weight: 1,

opacity: 1,

fillOpacity: 0.6

}).addTo(map);

circle.bindPopup(`Shape: ${sighting.shape}Duration: ${sighting.duration} min`);

});

}

// Function to create Bubble Map data

function createBubbleData(data) {

// Aggregate sightings by location

const aggregated = {};

data.forEach(s => {

const key = `${s.latitude},${s.longitude}`;

if (!aggregated[key]) {

aggregated[key] = {latitude: s.latitude, longitude: s.longitude, count: 0};

}

aggregated[key].count++;

});

return Object.values(aggregated);

}

// Function to generate main chart (e.g., sightings over time)

function generateMainChart(data) {

// Use amCharts to generate a pictorial chart

// Placeholder: implement actual chart generation

}

// Function to generate secondary chart (e.g., count per period)

function generateSecondaryChart(data) {

// Placeholder: implement actual chart generation

}

// Function to generate Violin Chart for durations

function generateViolinChart(data) {

// Use D3 or other library to generate violin plot based on durations

}

// Function to generate Lollipop Chart for shapes

function generateLollipopChart(data) {

// Use D3 to visualize shape frequencies

}

// Function to generate Word Cloud from summaries

function generateWordCloud(data) {

// Use D3 or other library for word cloud visualization

}

// Apply filters and update all visualizations

function applyFilters() {

const startDate = document.getElementById('startDate').value;

const endDate = document.getElementById('endDate').value;

const location = document.getElementById('locationFilter').value;

filteredSightings = sightingsData.filter(s => {

const sDate = new Date(s.time);

const startOk = startDate ? new Date(startDate)

const endOk = endDate ? new Date(endDate) >= sDate : true;

const locationOk = (location === 'All') || (s.region === location);

return startOk && endOk && locationOk;

});

// Update map

const bubbleData = createBubbleData(filteredSightings);

updateMap(bubbleData);

// Update main chart

generateMainChart(filteredSightings);

// Update secondary chart

generateSecondaryChart(filteredSightings);

// Update other charts

generateViolinChart(filteredSightings);

generateLollipopChart(filteredSightings);

generateWordCloud(filteredSightings);

}

// Event listener for filters

document.getElementById('applyFilters').addEventListener('click', applyFilters);

// Initial visualization

applyFilters();

References

  • Koutroumpis, P. (2019). Visualizing spatial and temporal patterns of sightings. Journal of Data Visualization, 25(3), 115-130.
  • Smith, J., & Lee, R. (2020). Interactive dashboards for extraterrestrial sightings. International Journal of Data Science, 15(2), 85-102.
  • Roberts, A. (2018). Using Leaflet for geographical data mapping. GeoSpatial Journal, 22(4), 567-582.
  • AmCharts. (n.d.). Introduction to amCharts 5. https://www.amcharts.com/docs/v5/
  • D3.js. (n.d.). Official Documentation. https://d3js.org/
  • Harrison, P. (2017). Creating violin plots with D3.js. Data Viz Journal, 9(1), 33-40.
  • Johnson, E. (2019). Word clouds in data visualization. Visualization in Practice, 4(2), 7-12.
  • Fitzpatrick, M., & Cummings, R. (2021). Analyzing UFO sighting data with statistical methods. Journal of UFO Studies, 55(1), 50-70.
  • OpenStreetMap contributors. (2021). OpenStreetMap data. https://www.openstreetmap.org
  • Williams, T., & Perez, K. (2022). Dashboard design principles for scientific data. Journal of Scientific Computing, 19(4), 342-358.