Skip to content

Commit

Permalink
#4 - fix capitalisation and other textual issues
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-crouch committed May 31, 2022
1 parent 6799013 commit 032489f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions survey/collaboration_and_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def run(survey_year, data="data/public_merged.csv"):
for country in COUNTRIES_WITH_WORLD:
countries.append({"country": country})
for category, columns in [
("developing code for others", people_code),
("Developing code for others", people_code),
("Working with same researchers", same_researcher),
("member of a dedicated group", dedicated_research),
("Member of a dedicated group", dedicated_research),
("Number of software projects", nbr_proj_soft),
("Number of software developers per projects", nbr_dev_proj),
]:
Expand Down
16 changes: 8 additions & 8 deletions survey/current_employment.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,25 +141,25 @@ def run(survey_year, data="data/public_merged.csv"):
countries.append({"country": country})
for columns, category in [
(current_emp, "Organisation type"),
(current_field, "in which field"),
(current_field, "In which field"),
(which_uni, "Which university"),
(contract_time, "Contract type"),
(nature_contract, "Nature of employment"),
(duration_contract, "Duration of contract in year"),
(salary, "Salary"),
(duration_contract, "Duration of contract in years"),
(salary, "Annual salary"),
(fund, "Type of funding"),
(title_job, "Official job title"),
(diff_title, "Different job title"),
(diff_title, "Are you known in your group by a different job title"),
]:
name = slugify(category)
# Disable salary and type of funding sections for world
if country == "World" and category in ["Salary", "Type of funding"]:
if country == "World" and category in ["Annual salary", "Type of funding"]:
continue
multi_choice = category in ["in which field", "Type of funding"]
multi_choice = category in ["In which field", "Type of funding"]

# Fix: process salary, unless the country isn't defined in the salary_ranges data,
# in which case just do default
if category == "Salary" and country in salary_ranges:
if category == "Annual salary" and country in salary_ranges:
order_question = salary_ranges[country]
try:
df_salary = get_sampled_df(df, salary)
Expand Down Expand Up @@ -196,7 +196,7 @@ def run(survey_year, data="data/public_merged.csv"):
plot_cat_comparison(result, country, category, order_index=order_question)
countries[-1].update(figure_country(country, name, plt))

elif category == "Duration of contract in year":
elif category == "Duration of contract in years":
result = describe_diff(
df,
duration_contract,
Expand Down

0 comments on commit 032489f

Please sign in to comment.