A few weeks ago, a student at the University of Hong Kong University of Science and Technology (HKUST) contacted me. The student represented a group of academics who needed to enrich a list of people with work experience and education history.The following article will share how I did this profile enrichment exercise with Enrich Layer API.
The problem
Given a list of people, my job is to find their corresponding user profiles and enrich the list with work and education history.
As it turns out, the data that HKUST provided is outdated.
Resolving people to their professional networks Profile
The list provided by HKUST came with a list of people with general but identifiable information about them. The list includes first names, last names, names of the employer, and their role in their organization. These bits of information are an exact match for Enrich Layer's Profile General Resolution Endpoint's input parameters.
To resolve loose bits of information of a person to his/her professional networks profile, I wrote the following function in Python code.
async def resolve_profile_url(first_name, last_name, title, country, city, coy_name, company_domain): last_ for _ in range(RETRY_COUNT): try: api_ Social Network/profile/resolve' header_ with httpx.AsyncClient() as client: f"\{coy_name\} \{company_domain\}", 'title': title, 'first_name': first_name, 'last_name': last_name, 'location': f"\{country\} \{city\}", } client.get(api_endpoint, ) if resp.status_code != 200: print(resp.status_code) assert resp.status_ 200 return resp.json()['url'] except KeyboardInterrupt: sys.exit() except Exception as exc: last_ raise last_exc
With the profile resolution code written, I iterated through a CSV list of people provided by HKUST and got a corresponding match of user profiles.
