vinnieOrdobas / ci_national_ai

0 stars 1 forks source link

Presentation of chart and mapped data #58

Open DeeMcCart opened 2 months ago

DeeMcCart commented 2 months ago

chat stream will provide chartable data if it is requested in conversation similarly will provide mappable data if it is requested in conversation

Below are responses received directly within the chat when each of these chart/ map view of data is requested:

DeeMcCart commented 2 months ago

Raw data returned when chart data is requested from the API:

[[{"f": "Estate name", "v": "Ardcullen Village"}, {"f": "County/town", "v": "Killenard (Wicklow)"}, {"f": "Number of units", "v": 50}, {"f": "Construction start", "v": "To be determined"}, {"f": "Construction completion", "v": "To be determined"}, {"f": "Date plan started", "v": "June 2025"}] , [{"f": "Estate name", "v": "The Orchard"}, {"f": "County/town", "v": "Wicklow town"}, {"f": "Number of units", "v": 49}, {"f": "Construction start", "v": "October 2027"}, {"f": "Construction completion", "v": "December 2029"}, {"f": "Date plan started", "v": "March 2026"}] , [{"f": "Estate name", "v": "The Orchards"}, {"f": "County/town", "v": "Newbridge Demesne, Donard"}, {"f": "Number of units", "v": 536}, {"f": "Construction start", "v": "June 2024"}, {"f": "Construction completion", "v": "June 2028"}, {"f": "Date plan started", "v": "February 2023"}] , [{"f": "Estate name", "v": "Ardglas"}, {"f": "County/town", "v": "Gorey"}, {"f": "Number of units", "v": 42}, {"f": "Construction start", "v": "May 2023"}, {"f": "Construction completion", "v": "November 2024"}, {"f": "Date plan started", "v": "March 2023"}] , [{"f": "Estate name", "v": "Kilrane Glen"}, {"f": "County/town", "v": "Gorey"}, {"f": "Number of units", "v": 249}, {"f": "Construction start", "v": "October 2026"}, {"f": "Construction completion", "v": "September 2029"}, {"f": "Date plan started", "v": "June 2026"}] , [{"f": "Estate name", "v": "Kilrane Green"}, {"f": "County/town", "v": "Wicklow"}, {"f": "Number of units", "v": 530}, {"f": "Construction start", "v": "September 2024"}, {"f": "Construction completion", "v": "September 2028"}, {"f": "Date plan started", "v": "June 2023"}] , [{"f": "Estate name", "v": "Killincarrick"}, {"f": "County/town", "v": "Kilbride"}, {"f": "Number of units", "v": 506}, {"f": "Construction start", "v": "August 2023"}, {"f": "Construction completion", "v": "August 2027"}, {"f": "Date plan started", "v": "July 2022"}] , [{"f": "Estate name", "v": "Seabrook"}, {"f": "County/town", "v": "Strand Road, Arklow"}, {"f": "Number of units", "v": 44}, {"f": "Construction start", "v": "August 2023"}, {"f": "Construction completion", "v": "March 2025"}, {"f": "Date plan started", "v": "March 2023"}] , [{"f": "Estate name", "v": "Seabrook"}, {"f": "County/town", "v": "Sea Road, Arklow"}, {"f": "Number of units", "v": 329}, {"f": "Construction start", "v": "March 2016"}, {"f": "Construction completion", "v": "March 2019"}, {"f": "Date plan started", "v": "May 2015"}] , [{"f": "Estate name", "v": "The View"}, {"f": "County/town", "v": "Wicklow town"}, {"f": "Number of units", "v": 56}, {"f": "Construction start", "v": "March 2025"}, {"f": "Construction completion", "v": "September 2027"}, {"f": "Date plan started", "v": "April 2024"}] , [{"f": "Estate name", "v": "Seaview Woods"}, {"f": "County/town", "v": "Arklow"}, {"f": "Number of units", "v": 55}, {"f": "Construction start", "v": "August 2022"}, {"f": "Construction completion", "v": "October 2024"}, {"f": "Date plan started", "v": "January 2022"}] ]

DeeMcCart commented 2 months ago

Raw data returned when mapping data is requested from the API (in chat):


const map = new google.maps.Map(document.getElementById("map"), options);
const markers = [ 
{ coords: { lat: 52.8605, lng: -6.7633 }, icon: "images/marker-red.png", label: "Ardcullen Village", }, 
{ coords: { lat: 52.7683, lng: -6.0574 }, icon: "images/marker-blue.png", label: "The Orchard", }, 
{ coords: { lat: 52.9622, lng: -6.0106 }, icon: "images/marker-blue.png", label: "The Orchards", }, 
{ coords: { lat: 52.7034, lng: -6.3002 }, icon: "images/marker-blue.png", label: "Ardglas", }, 
{ coords: { lat: 52.6345, lng: -6.2186 }, icon: "images/marker-blue.png", label: "Kilrane Glen", }, 
{ coords: { lat: 52.8624, lng: -6.2988 }, icon: "images/marker-green.png", label: "Kilrane Green", }, 
{ coords: { lat: 52.8073, lng: -6.5108 }, icon: "images/marker-green.png", label: "Killincarrick", }, 
{ coords: { lat: 52.8225, lng: -6.3685 }, icon: "images/marker-green.png", label: "Seabrook", }, ];
markers.forEach((marker) => { const markerWithLabel = new MarkerWithLabel({ position: marker.coords, map, icon: marker.icon, labelContent: marker.label, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels", // the CSS class for the label labelStyle: { opacity: 0.75 }, }); }); } ```
This modified code creates markers with labels that display the name of the housing estate. The markers have different colors depending on the status of the estates (construction hasn’t started, is currently underway or has finished).