Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

kuutsav/leetcode-compensation

Repository files navigation

Leetcode Compensations report

Scraping and analysis of the leetcode-compensations page (for India).

Check out https://github.com/kuutsav/LeetComp for an interactive version of this report.

Salary

Reports

-- Fixed salary: 29th Dec 2022 - 17th Dec 2023
-- Total salary: 29th Dec 2022 - 17th Dec 2023
-- Fixed salary(Dark mode): 29th Dec 2022 - 17th Dec 2023
-- Total salary(Dark mode): 29th Dec 2022 - 17th Dec 2023

-- Fixed salary: 5th Jan 2019 - 18th Jan 2022
-- Total salary: 5th Jan 2019 - 18th Jan 2022
-- Fixed salary(Dark mode): 5th Jan 2019 - 18th Jan 2022
-- Total salary(Dark mode): 5th Jan 2019 - 18th Jan 2022

Setup

$ git clone <repo>
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt

Data update

First we need to fetch the posts metadata. This inlvolves fetching the post ids from each page (till_date -> today).

$ source .venv/bin/activate
$ PYTHONPATH=. python leetcode/posts_meta.py --till_date 2023/01/01

The next step if to fetch the actual post content for each of the post ids from the previous step.

$ source .venv/bin/activate
$ PYTHONPATH=. python leetcode/posts.py --posts_meta F

Generating the reports

$ source .venv/bin/activate

$ python scripts/plots.py  # generate fixed comp. plots
$ python scripts/report.py  # fixed comp.
$ python scripts/report_dark.py  # fixed comp., dark mode

$ python scripts/plots_total.py  # generate total comp. plots
$ python scripts/report_total.py  # total comp.
$ python scripts/report_dark_total.py  # total comp., dark mode

About

Compensation analysis of leetcode.com/discuss/compensation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages