My idea was to build a way to visualize the provided BLS salary data on a 50 state map of the United States.
You can view the highest paying job in each state by hovering over each one. Click on a state to see detailed salary stats.
The frontend is built using React and Highmaps running on Vite, and the backend is built on FastAPI with and postgresql. I used pandas to clean the data and seed the database.
npmpipenv- postgresql 14
- python >= 3.10
- node >= 20 or newer
- Clone this repository
Backend Setup
cdinto this repo and runpipenv install- Copy the
.env.samplefile into a file called.env. Replace the values with ones that work on your system, especially the database name, user, and password. - Run
pipenv shellto activate the virtual environment - Run
python3 app/pandas_input.pyto populate the database - Run
fastapi dev app/main.pyto launch the backend, which runs on http://localhost:8000 - View the interactive API docs at http://localhost:8000/docs
Frontend Setup
cdintoclientand runnpm install- Run
npx vite devto launch the frontend. - Frontend should run on http://localhost:5173
- Clean the data in a more realistic way, so we don't end up with duplicate salaries per job title per state
- Think about what other data could be shown on map, in detail or overview
- Add close button for detail view
- Use schema validation for state_abbr path parameter