Skip to content

Commit

Permalink
disable area download tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
nimarion committed Feb 27, 2024
1 parent 7b4dec4 commit 68ebafe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/leads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
python worldranking_downloader.py
python taf.py --input leads/country --output leads/country/taf.csv
python taf.py --input leads/world --output leads/world/taf.csv
python taf.py --input leads/area --output leads/area/taf.csv
git config user.name Github Action
git config user.email [email protected]
git add leads/*/taf.csv
Expand Down
3 changes: 3 additions & 0 deletions taf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
df = df.fillna("")
df = df.replace("nan", "")

if leadFile:
df = df.drop_duplicates(subset=["discipline", "code", "sex"], keep="first")

outputDf = pd.concat([outputDf, df])

outputDf.to_csv(args.output, index=False)
12 changes: 6 additions & 6 deletions worldranking_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

for sex in sex:
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType world --output leads/world/{sex}-{discipline}.csv")
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region europe --output leads/area/europe/{sex}-{discipline}.csv")
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region africa --output leads/area/africa/{sex}-{discipline}.csv")
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region asia --output leads/area/asia/{sex}-{discipline}.csv")
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region \"north and central america\" --output leads/area/naca/{sex}-{discipline}.csv")
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region oceania --output leads/area/oceania/{sex}-{discipline}.csv")
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region \"south america\" --output leads/area/sa/{sex}-{discipline}.csv")
#os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region europe --output leads/area/europe/{sex}-{discipline}.csv")
#os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region africa --output leads/area/africa/{sex}-{discipline}.csv")
#os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region asia --output leads/area/asia/{sex}-{discipline}.csv")
#os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region \"north and central america\" --output leads/area/naca/{sex}-{discipline}.csv")
#os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region oceania --output leads/area/oceania/{sex}-{discipline}.csv")
#os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType area --region \"south america\" --output leads/area/sa/{sex}-{discipline}.csv")
os.system(f"python worldranking.py --type {type} --discipline {discipline} --sex {sex} --ageCategory senior --year {year} --regionType countries --region ger --output leads/country/ger/{sex}-{discipline}.csv")

0 comments on commit 68ebafe

Please sign in to comment.