Skip to content

Commit

Permalink
extend todo
Browse files Browse the repository at this point in the history
  • Loading branch information
yachty66 committed Jul 6, 2024
1 parent 8573b5a commit 51dec10
Show file tree
Hide file tree
Showing 9 changed files with 466 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
.vercel
__pycache__
__pycache__
public/node_modules
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ if we build this from scratch than i dont even need supabase
- [ ] make all the spots which have a name in the map already like golden gate park
- [ ] make everything clickable
- [ ] show current location
- [ ] add location
- [ ] make landing page like clone.wtf with green black colors and add a pantheon logo at the top left
- [ ] figure out how i can use my delaware to make it usable for pantheon so that i can give an angel 1% for my startup
- [ ] add star on github button
- [ ] add more agentic functions
- [ ] go to X

returning functions to call from the chatinterface would be the best


useful links for getting streaming working in prod:

https://github.com/vercel/next.js/discussions/47076
- [ ] selector for safety map in san francisco - which shows how safe an certain street is
- [x] add more agentic functions
- [x] go to X
16 changes: 15 additions & 1 deletion public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ function initializeMap() {
map.on("load", function () {
loadEvents();
});

// Add click event listener to the map
map.on("click", function (e) {
const features = map.queryRenderedFeatures(e.point);
if (features.length) {
const feature = features[0];
new mapboxgl.Popup()
.setLngLat(e.lngLat)
.setHTML(
`<h3>${feature.properties.name}</h3><p>${feature.properties.description}</p>`
)
.addTo(map);
}
});
}

function loadEvents() {
Expand All @@ -35,7 +49,7 @@ function displayEvents(events) {
const { longitude, latitude } = event.geocoded_address;

// Create a red marker for each event
new mapboxgl.Marker({ color: "#FF0000" })
new mapboxgl.Marker({ color: "#FF0000" })
.setLngLat([longitude, latitude])
.setPopup(
new mapboxgl.Popup({ offset: 25 }) // add popups
Expand Down
251 changes: 251 additions & 0 deletions public/mapbox_geocoding_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
test = {
"type": "FeatureCollection",
"query": ["1600", "pennsylvania", "ave", "nw", "washington", "dc", "20500"],
"features": [
{
"id": "address.3807264357927334",
"type": "Feature",
"place_type": ["address"],
"relevance": 1,
"properties": {
"accuracy": "rooftop",
"mapbox_id": "dXJuOm1ieGFkcjoxYWIxM2EwYy00NGI4LTQyMGMtOGE0MS0wZmYyNDE3NjBlNDY",
},
"text": "Pennsylvania Avenue Northwest",
"place_name": "1600 Pennsylvania Avenue Northwest, Washington, District of Columbia 20500, United States",
"matching_place_name": "1600 Pennsylvania Avenue Northwest, Washington, DC 20500, United States",
"center": [-77.036521, 38.897685],
"geometry": {"type": "Point", "coordinates": [-77.036521, 38.897685]},
"address": "1600",
"context": [
{
"id": "neighborhood.429993196",
"mapbox_id": "dXJuOm1ieHBsYzpHYUVzN0E",
"text": "National Mall",
},
{
"id": "postcode.63000300",
"mapbox_id": "dXJuOm1ieHBsYzpBOEZPN0E",
"text": "20500",
},
{
"id": "place.345549036",
"mapbox_id": "dXJuOm1ieHBsYzpGSmlvN0E",
"wikidata": "Q61",
"text": "Washington",
},
{
"id": "region.328940",
"mapbox_id": "dXJuOm1ieHBsYzpCUVRz",
"wikidata": "Q3551781",
"short_code": "US-DC",
"text": "District of Columbia",
},
{
"id": "country.8940",
"mapbox_id": "dXJuOm1ieHBsYzpJdXc",
"wikidata": "Q30",
"short_code": "us",
"text": "United States",
},
],
},
{
"id": "poi.592705513820",
"type": "Feature",
"place_type": ["poi"],
"relevance": 0.813333,
"properties": {
"foursquare": "3fd66200f964a520d6f01ee3",
"wikidata": "Q35525",
"landmark": True,
"address": "1600 Pennsylvania Ave NW",
"category": "historic site, historic",
},
"text": "The White House",
"place_name": "The White House, 1600 Pennsylvania Ave NW, Washington, District of Columbia 20500, United States",
"matching_text": "1600 Pennsylvania Avenue",
"matching_place_name": "1600 Pennsylvania Avenue, 1600 Pennsylvania Ave NW, Washington, DC 20500, United States",
"center": [-77.036556, 38.8977365],
"geometry": {"coordinates": [-77.036556, 38.8977365], "type": "Point"},
"context": [
{
"id": "neighborhood.429993196",
"mapbox_id": "dXJuOm1ieHBsYzpHYUVzN0E",
"text": "National Mall",
},
{
"id": "postcode.63000300",
"mapbox_id": "dXJuOm1ieHBsYzpBOEZPN0E",
"text": "20500",
},
{
"id": "place.345549036",
"mapbox_id": "dXJuOm1ieHBsYzpGSmlvN0E",
"wikidata": "Q61",
"text": "Washington",
},
{
"id": "region.328940",
"mapbox_id": "dXJuOm1ieHBsYzpCUVRz",
"wikidata": "Q3551781",
"short_code": "US-DC",
"text": "District of Columbia",
},
{
"id": "country.8940",
"mapbox_id": "dXJuOm1ieHBsYzpJdXc",
"wikidata": "Q30",
"short_code": "us",
"text": "United States",
},
],
},
{
"id": "poi.867583441398",
"type": "Feature",
"place_type": ["poi"],
"relevance": 0.677778,
"properties": {
"foursquare": "4c28f397ce3fc92849fd6d88",
"landmark": True,
"address": "1101 Pennsylvania Ave NW",
"category": "business, service, building",
},
"text": "1101 Pennsylvania Avenue NW",
"place_name": "1101 Pennsylvania Avenue NW, 1101 Pennsylvania Ave NW, Washington, District of Columbia 20004, United States",
"matching_place_name": "1101 Pennsylvania Avenue NW, 1101 Pennsylvania Ave NW, Washington, DC 20004, United States",
"center": [-77.02741, 38.89527],
"geometry": {"coordinates": [-77.02741, 38.89527], "type": "Point"},
"context": [
{
"id": "neighborhood.170716396",
"mapbox_id": "dXJuOm1ieHBsYzpDaXpzN0E",
"text": "Downtown",
},
{
"id": "postcode.60739308",
"mapbox_id": "dXJuOm1ieHBsYzpBNTdPN0E",
"text": "20004",
},
{
"id": "place.345549036",
"mapbox_id": "dXJuOm1ieHBsYzpGSmlvN0E",
"wikidata": "Q61",
"text": "Washington",
},
{
"id": "region.328940",
"mapbox_id": "dXJuOm1ieHBsYzpCUVRz",
"wikidata": "Q3551781",
"short_code": "US-DC",
"text": "District of Columbia",
},
{
"id": "country.8940",
"mapbox_id": "dXJuOm1ieHBsYzpJdXc",
"wikidata": "Q30",
"short_code": "us",
"text": "United States",
},
],
},
{
"id": "poi.1271310332647",
"type": "Feature",
"place_type": ["poi"],
"relevance": 0.677778,
"properties": {
"foursquare": "4c2a115efe6e2d7f10c4553c",
"landmark": True,
"category": "business, service, building",
},
"text": "801 Pennsylvania Ave NW",
"place_name": "801 Pennsylvania Ave NW, Washington, District of Columbia 20004, United States",
"matching_place_name": "801 Pennsylvania Ave NW, Washington, DC 20004, United States",
"center": [-77.023419, 38.89476],
"geometry": {"coordinates": [-77.023419, 38.89476], "type": "Point"},
"context": [
{
"id": "neighborhood.170716396",
"mapbox_id": "dXJuOm1ieHBsYzpDaXpzN0E",
"text": "Downtown",
},
{
"id": "postcode.60739308",
"mapbox_id": "dXJuOm1ieHBsYzpBNTdPN0E",
"text": "20004",
},
{
"id": "place.345549036",
"mapbox_id": "dXJuOm1ieHBsYzpGSmlvN0E",
"wikidata": "Q61",
"text": "Washington",
},
{
"id": "region.328940",
"mapbox_id": "dXJuOm1ieHBsYzpCUVRz",
"wikidata": "Q3551781",
"short_code": "US-DC",
"text": "District of Columbia",
},
{
"id": "country.8940",
"mapbox_id": "dXJuOm1ieHBsYzpJdXc",
"wikidata": "Q30",
"short_code": "us",
"text": "United States",
},
],
},
{
"id": "address.4331768223432906",
"type": "Feature",
"place_type": ["address"],
"relevance": 0.652063,
"properties": {
"accuracy": "rooftop",
"mapbox_id": "dXJuOm1ieGFkcjpmOTYwMzc4OC01MWE4LTQ3NzQtOWVhMi1lM2ZkZGY0NWQ0OWI",
},
"text": "Pennsylvania Avenue Southeast",
"place_name": "1600 Pennsylvania Avenue Southeast, Washington, District of Columbia 20003, United States",
"matching_place_name": "1600 Pennsylvania Avenue Southeast, Washington, DC 20003, United States",
"center": [-76.982024, 38.879243],
"geometry": {"type": "Point", "coordinates": [-76.982024, 38.879243]},
"address": "1600",
"context": [
{
"id": "neighborhood.89894124",
"mapbox_id": "dXJuOm1ieHBsYzpCVnVzN0E",
"text": "Capitol Hill",
},
{
"id": "postcode.60731116",
"mapbox_id": "dXJuOm1ieHBsYzpBNTZ1N0E",
"text": "20003",
},
{
"id": "place.345549036",
"mapbox_id": "dXJuOm1ieHBsYzpGSmlvN0E",
"wikidata": "Q61",
"text": "Washington",
},
{
"id": "region.328940",
"mapbox_id": "dXJuOm1ieHBsYzpCUVRz",
"wikidata": "Q3551781",
"short_code": "US-DC",
"text": "District of Columbia",
},
{
"id": "country.8940",
"mapbox_id": "dXJuOm1ieHBsYzpJdXc",
"wikidata": "Q30",
"short_code": "us",
"text": "United States",
},
],
},
],
"attribution": "NOTICE: © 2024 Mapbox and its suppliers. All rights reserved. Use of this data is subject to the Mapbox Terms of Service (https://www.mapbox.com/about/maps/). This response and the information it contains may not be retained. POI(s) provided by Foursquare.",
}
Loading

0 comments on commit 51dec10

Please sign in to comment.