alteryx Community

# Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
###### IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

## Challenge #333: Remote or Not Remote

Alteryx

A solution to last week’s challenge can be found here.

For this challenge, imagine you are a senior-level professional researching the job market.

The first dataset contains information about the job market in data analysis. The second dataset contains the country codes and the full names of the countries.

The experience is categorized into 4 levels:
- EN: Entry-level/Junior
- MI: Mid-level/Intermediate
- SE: Senior-level/Expert
- EX: Executive-level/Director

Remote ratio correspondence:
- If Remote_ratio = 0, the job is onsite.
- If Remote_ratio = 50, the job is hybrid.
- If Remote_ratio = 100, the job is remote.

Question 1
Taking into consideration the average salary, find the 5 best opportunities for a senior-level professional working full-time, 100% remote, and the countries where these opportunities can be found.
Only consider job titles that appear more than once and salary in USD.

Question 2
How do the remote, hybrid, and onsite ratios vary from 2020 to 2022? Build a graph to show your results.

Hints
- Append the country name in the dataset using the company_location_country_code field.
- Change your data types accordingly.

16 - Nebula

It's 100% Remote here at Aimpoint Digital. Solution attached,

Spoiler

Adding my solution in the Python Tool,

Spoiler
Spoiler
``````from ayx import Alteryx
import plotly.express as px

#################################

#################################

#################################
mask = (df1.employment_type=='FT') & (df1.remote_ratio=='100') & (df1.experience_level=='SE')

#################################
df1 = df1.join(country_mapper.set_index('country_code'), on='company_location_country_code')

#################################
df1['salary_in_usd'] = df1.salary_in_usd.astype(int)

#################################
df1.groupby(['country_name', 'job_title'], as_index=False)['salary_in_usd'].mean().nlargest(5, 'salary_in_usd')

#################################
df2 = df.groupby(['work_year', 'remote_ratio'], as_index=False)['salary'].count().rename(columns={'salary':'count'})

#################################
df2['remote_ratio'] = df2.remote_ratio.map({'0': 'Onsite', '50': 'Hybrid', '100': 'Remote' })

#################################
df2 = df2.sort_values('remote_ratio').rename(columns={'remote_ratio':'Work Type', 'count':'Count', 'work_year':'Year'})

#################################
px.bar(df2, x='Work Type', y='Count', color='Year', barmode='group')``````

11 - Bolide

Challenge 333

Spoiler
I did a slightly different chart. I put year as x-axis instead of remote type to make it easier to see the trend over time

15 - Aurora

A couple of little pitfalls with that one, be careful to read the question!

Spoiler

Cheers,
TheOC!

17 - Castor

Nice challenge:

Spoiler

17 - Castor

My solution!

Spoiler

16 - Nebula

Like @PhilipMannering said, we are 100% remote at Aimpoint Digital 😊

Spoiler
16 - Nebula
Spoiler
Spoiler
12 - Quasar
Spoiler

8 - Asteroid

I had to do some debugging because I wasn't getting the right answer at first. I left my debugging steps in so that you can see where I made an adjustment.

Spoiler