GCTC-NTGC / gc-digital-talent

GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numériques du GC est la nouvelle plateforme de recrutement pour les emplois numériques et technologiques au gouvernement du Canada.
https://talent.canada.ca
GNU Affero General Public License v3.0
18 stars 8 forks source link

🦔 Location services API investigation #10274

Closed gobyrne closed 2 weeks ago

gobyrne commented 3 months ago

🦔 Spike

We currently handle locations by using broad Canadian regions to allow candidates to share their preferences. Eventually, if we want to be able to improve our automated matching, we'll need to do better and actually geo-locate places.

This is something we've been eying for a while and we'd like to see if we can put up a proof of concept.

🤔 Why move to an API for this

Josh's angle

"As an applicant, I want to be offered jobs in or around my current location by default, with the option to specify other locations as needed."

"As a manager, I want to find the best talent match with the skills I need who is willing to work in or around the location the job is available in."

The API would offer the following flexibilities:

Our current implementation is problematic for two reasons:

🕵️ Details

https://developers.google.com/maps/documentation/javascript/places https://exoapi.dev/blog/building-an-autocomplete-address-form-in-react

Time Box

âť“ Questions

mnigh commented 3 months ago

some questions:

JoshBeveridge commented 3 months ago

@mnigh I've answered a few of your questions in the main body of the ticket, but here are my thoughts:

gobyrne commented 3 months ago

@tristan-orourke can you take a look at Josh's addition to the issue please? Let us know if you think it's worthwhile spiking now.

tristan-orourke commented 2 months ago

Let's turn this into a list of questions first. Here's what I'd want to know:

gobyrne commented 2 months ago

https://www.statcan.gc.ca/en/lode/databases/oda

gobyrne commented 2 months ago

Updated the issue based on Tristan's feedback.

esizer commented 2 months ago
  • how do we integrate with an external api to autocomplete user location input (expect a proof-of-concept)

I'd reccomend a third party service like MapBox or Google Maps. These are very simple (I have done it many times) to do and can be restricted to geographic locations pretty easily.

  • how would we store preferences (eg list of geo-coordinates plus allowable radius, list of geo-fenced regions according to google, list of standardized addresses, etc)

A few options could be taken here. I usually store just lat lng and then have a km radius. Though, you can do bounds using GeoJSON as well.

  • how do compare an office address to what we have stored in the database to produce matches? (For example, a geography postgres plugin might help with this)

Haversine

  • what kind of budget would we need for these services

I have seen costs anywhere from $200-$2000/month for services. It all depends on how much you use. If we are just using autocomplete I'd wager we are near or at the min cost here.

brindasasi commented 2 months ago

Brinda & Eric have done that and we can discuss on that.

brindasasi commented 1 month ago

@gobyrne what's the next step on this?