| app | ||
| data | ||
| .gitignore | ||
| build_and_run_docker.sh | ||
| build_and_run_python.sh | ||
| Dockerfile | ||
| readme.md | ||
| requirements.txt | ||
Requirements
Build a simple application using existing technologies (hint: we don’t need you to build a shapefile parser from scratch) that will allow shapefiles to be visualized on a map. Shapefile data does not need to be persisted into a database, this application should be ephemeral and have the potential to be entirely offline.
You’re free to use the framework of your choice. We want to understand how you approach this from a product perspective. Remember, we’re chasing ease of use!
Please don’t spend more than 1-2 hours on this exercise. Get something working, and we can have a discussion about features that would have followed.
Running the app
Running the app via Docker:
chmod u+x build_and_run.sh
./build_and_run_docker.sh
- Visit http://0.0.0.0:8501
- Ctrl + c to quit
Running the app via Python with virtual env:
chmod u+x build_and_run.sh
./build_and_run_python.sh
- Visit http://0.0.0.0:8501
- Ctrl + c to quit
My dev notes:
-
streamlit getting started (done)
-
display a shapefile
- streamlit plotting doesn't work out of the box for polygons
- geopandas has a geopandas dataframe, dartaframes required for st.map
- st.map is a st.pydeck_chart wrapper
- st.pydeck_chart uses mapbox
- may need mapbox token - Mapbox requires users to register and provide a token before users can request map tiles. Currently, Streamlit provides this token for you, but this could change at any time.
- Can I plot polygons or just points?
- test data doesn't plot immediately
- Folium can plot polygons in streamlit via geojson
- requires 3rd party plugin st_folium
- ok I have folium plotting test data
- easiest/least depedencies to convert shapefiles to geojson?
- easy/1-million dependencies: geopands+pandas
- already have that working so will leave it and discuss other options with Evan
- easy/1-million dependencies: geopands+pandas
-
things to add
- add a legend
- better theme
- deterministic map config toi prevent random width/height based on geo data etc