clean-and-green-philly icon indicating copy to clipboard operation
clean-and-green-philly copied to clipboard

Bug: "Street View" button links to wrong address

Open nlebovits opened this issue 1 year ago • 8 comments

Describe the bug The "street view" button for 4307 N 16th St. links to 1535 W. Bristol St. This may be due to the properties being close to each other--unclear. Does not seem to happen for all properties, so it might be something weird specific to this property. Needs investigation.

Screenshots image

Desktop (please complete the following information): Running Firefox 131.0.3 on Ubuntu 24.

nlebovits avatar Oct 27 '24 21:10 nlebovits

This issue has been marked as stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 27 '24 00:11 github-actions[bot]

Hi @nlebovits ! I attended the Hackathon night on Tuesday and spoke with @CodeWritingCow about contributing to this project. This looks like a good challenge I'd be happy to take on though I'm not sure if it is still an issue. If so, could you assign it to me? If not, could you recommend a different issue? I have pretty broad experience full stack so I'm happy to try anything you have.

rkillion avatar Jan 16 '25 17:01 rkillion

@rkillion assigned! Thanks for tackling this.

CodeWritingCow avatar Jan 16 '25 23:01 CodeWritingCow

@CodeWritingCow @nlebovits Sorry it took me a while to get going on this! But I was able to get installed and start taking a look this week, so just wanted to give you an update:

I was able to confirm that incorrect latitude and longitude are being passed to the StreetView component for this address. Passing {lat: 40.01906368194187, lon: -75.15209555625916, ...} when it should be {lat: 40.0191167, lon: -75.1524003, ...} according to google maps. When the correct coordinates are passed manually to the StreetView component, it lands in the right location.

So I just need to work backwards from there to figure out where the incorrect coordinates are coming from. I should have some more time to work on it this week so hopefully I'll have another update soon!

rkillion avatar Jan 29 '25 17:01 rkillion

@rkillion thanks for the update! Please keep us posted.

CodeWritingCow avatar Feb 01 '25 21:02 CodeWritingCow

@CodeWritingCow @nlebovits , hope you are well! I was able to identify the issue and a possible fix for this. However, the fix I have requires using the Geocode API to get a more accurate streetview point, and you may have a better solution based on data already available in the database. Here's a short video showing the issue and solution: https://www.loom.com/share/c73041327f8e47979b69e5c9b8e20576?sid=3bbefb8e-f587-457c-bbb2-b347cfd85669

Check out the video when you get the chance and if that solution seems ok, let me know and I can move forward with it!

rkillion avatar Feb 07 '25 19:02 rkillion

@rkillion thank you for looking into this and explaining your findings in the loom video!

If I understand your video correctly, then it'd be more accurate to use Geocode API's driving/navigation coordinates. Does the Geocode API have a rate limit?

This project does have a Google API key being used for the maps streetview API. That API is getting called by our data pipeline (see data/src/streetview.py).

We are getting each vacant property's location from our data pipeline. I'm not sure if the pipeline is saving each property location as an address or as coordinates. @nlebovits would you happen to know?

CodeWritingCow avatar Feb 19 '25 00:02 CodeWritingCow

Sorry, I missed this message! We get the property geometry from the City's databases. That's probably the most accurate way to get the location for streetview, I'd imagine. @rkillion hope you're still interested in working on this!

nlebovits avatar Mar 15 '25 14:03 nlebovits