No project description provided
Project description
prettymapp 🖼️
Prettymapp is a webapp and Python package to create beautiful maps from OpenStreetMap data
🎈 Try it out here: prettymapp on streamlit 🎈
Based on the prettymaps project
Prettymapp is based on a rewrite of the fantastic prettymaps project by @marceloprates. All credit for the original idea, designs and implementation go to him. The prettymapp rewrite focuses on speed and adapted configuration to interface with the webapp. It drops more complex configuration options in favour of improved speed, reduced code complexity and simplified configuration interfaces. It is partially tested and adds a streamlit webapp component.
Running the app locally
git clone https://github.com/chrieke/prettymapp.git
cd prettymapp
pip install -r streamlit-prettymapp/requirements.txt
streamlit run streamlit-prettymapp/app.py
Python package
You can also use prettymapp without the webapp, directly in Python. This lets you customize the functionality or build your own application.
Installation:
pip install prettymapp
Define the area, download and plot the OSM data:
from prettymapp.geo import get_aoi
from prettymapp.osm import get_osm_geometries
from prettymapp.plotting import Plot
from prettymapp.settings import STYLES
aoi = get_aoi(address="Praça Ferreira do Amaral, Macau", radius=1100, rectangular=False)
df = get_osm_geometries(aoi=aoi)
fig = Plot(
df=df,
aoi_bounds=aoi.bounds,
draw_settings=STYLES["Peach"]
).plot_all()
fig.savefig("map.jpg")
You can also plot exported OSM XML files e.g. from openstreetmap.org:
from prettymapp.osm import get_osm_geometries_from_xml
df = get_osm_geometries_from_xml(filepath="Berlin.osm")
aoi_bounds = df.total_bounds
...
To customize the map appearance, use the additional arguments of the Plot
class (e.g. shape
,
contour_width
etc.). Check the preconfigured styles and
webapp examples for inspiration.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file prettymapp-0.3.0.tar.gz
.
File metadata
- Download URL: prettymapp-0.3.0.tar.gz
- Upload date:
- Size: 53.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2486917ba5b86c86f51f75d0974fc753d5dce161c9583706cd1819649674b12 |
|
MD5 | e07da2723a6ff01fb1db785993f0e6fa |
|
BLAKE2b-256 | 7e10af878b810fe10cedbf20e10456a77097ff9a9ffb3f943efe2c8643596d2a |
File details
Details for the file prettymapp-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: prettymapp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 53.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad86c8ccc3f6f3c44f3a7c8ddf720f4538deff0bfe08ad4d152ad511a8c2b68a |
|
MD5 | c4386c8f8a451691f644dfaa2d3bbcce |
|
BLAKE2b-256 | 7f0cf9476f0033125022727ced96f31fba85c98e4517d03cdefa907ce3dd5e9c |