Closed watadarkstar closed 4 years ago
- CORS issues.
Nothing we can really do, if people put CORS in place for their data we should not look for ways to circumvent (there are ways but there could be legal ramification), what you did is perfect contact the API team and let them know...
2,800 markers
That's a nice challenge, will look into it on my end... if you can share your code will be nice! Maybe the bug is in your end
lots of improvements needed
Yes! this project is 2 days old!!! ...and lots of developers needed too if you can break down into separate issues what you would like to see we can start prioritizing and tackling them as time is available
I was diving into the:
markers on the map but they do not all appear
and there is a LOT of duplicate data there...
There is a way to do it with Google maps but I haven't tried this yet: https://github.com/istarkov/google-map-thousands-markers
Here is the site https://istarkov.github.io/google-map-thousands-markers/ and I would not recommend that to anyone
When we have a lot of markers the way to go is Marker Clustering: https://developers.google.com/maps/documentation/javascript/marker-clustering
@heldersepu Thank you for the cluster recommendation! I was able to do marker clustering this morning on the Ontario dataset, you can check it out here: https://deploy-preview-3--covid-19-map-ontario.netlify.com
I will provide source code soon!
... but let me reiterate: there are a lot of duplicates on that data:
according to that the are 683 on that one location, maybe those coordinates are not the actual case location ...
Looking at google maps: https://www.google.com/maps/place/Toronto+Public+Health/@43.6561883,-79.3792294,18.79z/data=!4m13!1m7!3m6!1s0x4cce05b25f5113af:0x70f8425629621e09!2sOntario,+Canada!3b1!8m2!3d51.253775!4d-85.323214!3m4!1s0x89d4cb352521d5fd:0x5acf5c473974f2de!8m2!3d43.6565316!4d-79.379375?hl=en that is the Toronto Public Health building my guess those coordinates are the agency that confirmed the case not the known locations of the patient(s)
I think this is your source code: https://github.com/watadarkstar/covid-19-map-ontario/blob/master/src/MapContainer.js#L67-L68
latitude: properties.Reporting_PHU_Latitude,
longitude: properties.Reporting_PHU_Longitude,
That name confirms my suspicions Reporting_PHU_*
that is not a known location of patient.
Right now I can't really see a use for that...
@heldersepu Yeah for sure. I understand that these are not exact patient case coordinates.
@heldersepu I don't think governments would give exact patient data? Wouldn't that be a violation of privacy?
Join us, we can use your expertise... @marleymarl can you send him an invite to slack
@heldersepu Yes, I'll do that. First I need his email. @watadarkstar I'll reach out on LinkedIn to get that from you.
@heldersepu I don't think governments would give exact patient data? Wouldn't that be a violation of privacy?
@watadarkstar That's why we are building a totally anonymous and private input.
To get a better sense of what data that GeoTimeline captures see: https://app.geotimeline.com/dataview.
governments would give exact patient data? ... violation of privacy?.
it does not need to be exact or contain private data. but to trace a patient we need to know more about time and locations, example:
Patient landed from Italy on February 30 on Miami international at 10AM lunch with the family @ La Carreta in called ocho Then at 5pm he got some supplies from Home Depot Following date (February 31) patient at 8AM ran from Downtown Fort Lauderdale via Las Olas all the way to the beach and had lunch at Cafe Ibiza. Next day patient started showing symptoms and self quarantined
with that others can see if they been in the same route with someone potentially infected
@marleymarl Cool yeah I understand. My project was more about exploring different visualizations on the Ontario dataset. I found your repository and it was a good starting point for me even though I didn't really need the patient collection part. This repo was useful to me because you had a bunch of the work already setup for me. I know I'm not using this codebase as it was intended to be used but it was helpful even for my use case.
I still want to explore building a heat map with polygon boundaries. But here is what I have tried so far:
useSuperCluster
and useSWR
. I can help you guys convert the codebase to hooks. google-maps-react
for another library called google-map-react
. It was easier for me to do clustering with.Definitely add me to slack and we can chat more :)
Here is my source code (master has clusters, hooks, and the swap of google-react-map
):
https://github.com/watadarkstar/covid-19-map-ontario
Mapbox version: https://github.com/watadarkstar/covid-19-map-ontario/tree/mapbox
Ye refactoring the code would be a very welcomed addition, there is an issue open for that: https://github.com/marleymarl/geotime/issues/10
I'm gonna close this one since it is not something we have to work on
Hi @marleymarl π
I saw your post on Linkedin and wanted to try my hands at integrating the Confirmed positive cases of COVID19 in Ontario dataset with what you have built.
After a couple hours I was able to integrate Ontario's 2,800 data points into your tool, check it out here: https://covid-19-map-ontario.netlify.com/
I learned a few things along the way that might be useful to you and your team / volunteers.
I tried to integrate with the Ontario Data API at first but ran into CORS issues. A POST to https://data.ontario.ca/api/3/action/datastore_search should work but it doesn't due to browser CORS issues. I contacted the Ontario data team to see if they can help as it seems like the API is not accessible by 3rd party websites. For the time being I downloaded the JSON data and stored it statically on the website mentioned above.
There should be 2,800 markers on the map but they do not all appear. I'm guessing this is a limitation of the library Google maps React. Two options worth exploring:
There is a way to do it with Google maps but I haven't tried this yet: https://github.com/istarkov/google-map-thousands-markers
What I did try is using Mapbox and react-map-gl built by Uber: https://5e87a24a03eea30006476635--covid-19-map-ontario.netlify.com/
EDIT: It seems like the dataset is not very accurate and is reporting very rough lats and longs and that might be the reason for not all 2,800 markers showing up
Hope this helps you and your team π