{"id":13491969,"url":"https://github.com/chrieke/prettymapp","last_synced_at":"2025-05-13T19:11:46.116Z","repository":{"id":38409288,"uuid":"410935357","full_name":"chrieke/prettymapp","owner":"chrieke","description":"🖼️ Create beautiful maps from OpenStreetMap data in a streamlit webapp","archived":false,"fork":false,"pushed_at":"2024-12-29T21:29:48.000Z","size":39217,"stargazers_count":2514,"open_issues_count":6,"forks_count":396,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-13T19:09:05.673Z","etag":null,"topics":["app","art","cartography","geography","map","osm","prettymaps","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrieke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-27T15:15:02.000Z","updated_at":"2025-05-13T05:05:32.000Z","dependencies_parsed_at":"2023-01-29T19:45:55.468Z","dependency_job_id":"26b78afb-a869-4c45-9860-bef2b2c28d40","html_url":"https://github.com/chrieke/prettymapp","commit_stats":{"total_commits":216,"total_committers":6,"mean_commits":36.0,"dds":0.07870370370370372,"last_synced_commit":"fb52cfeb62d6a38683be2f06de23ab855a87d3f1"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrieke%2Fprettymapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrieke%2Fprettymapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrieke%2Fprettymapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrieke%2Fprettymapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrieke","download_url":"https://codeload.github.com/chrieke/prettymapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010813,"owners_count":21998993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","art","cartography","geography","map","osm","prettymaps","streamlit"],"created_at":"2024-07-31T19:01:02.001Z","updated_at":"2025-05-13T19:11:46.098Z","avatar_url":"https://github.com/chrieke.png","language":"Python","readme":"# prettymapp 🖼️\n\n**Prettymapp is a webapp and Python package to create beautiful maps from OpenStreetMap data**\n\n---\n\u003ch3 align=\"center\"\u003e\n    🎈 Try it out here: \u003ca href=\"https://prettymapp.streamlit.app/\"\u003eprettymapp on streamlit 🎈 \u003c/a\u003e\n\u003c/h3\u003e\n\n---\n\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://prettymapp.streamlit.app/\"\u003e\u003cimg src=\"./streamlit-prettymapp/example_prints/demo.gif\" width=700\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003cimg src=\"./streamlit-prettymapp/example_prints/macau.png\"\u003e\u003c/td\u003e\u003ctd\u003e\u003cimg src=\"./streamlit-prettymapp/example_prints/barcelona.png\"\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n## Based on the prettymaps project\n\nPrettymapp is based on a rewrite of the fantastic [prettymaps](https://github.com/marceloprates/prettymaps) project by\n[@marceloprates](https://github.com/marceloprates). All credit for the original idea, designs and implementation go to him.\nThe prettymapp rewrite focuses on speed and adapted configuration to interface with the webapp.\nIt drops more complex configuration options in favour of improved speed, reduced code complexity and \nsimplified configuration interfaces. It is partially tested and adds a [streamlit](https://streamlit.io/) webapp component.\n\n## Running the app locally\n\nYou can use the webapp directly under [prettymapp.streamlit.app](https://prettymapp.streamlit.app/) or run it locally via:\n\n```bash\ngit clone https://github.com/chrieke/prettymapp.git\ncd prettymapp\npip install -r streamlit-prettymapp/requirements.txt\nstreamlit run streamlit-prettymapp/app.py\n```\n\n## Python package\n\nYou can also use prettymapp without the webapp, directly in Python. This lets you customize the functionality or \nbuild your own application.\n\n**Installation:**\n\n```bash\npip install prettymapp\n```\n\n**Define the area, download and plot the OSM data:**\n\nYou can select from 4 [predefined styles](prettymapp/settings.py#L35): `Peach`, `Auburn`, `Citrus` and `Flannel`.\n\n```python\nfrom prettymapp.geo import get_aoi\nfrom prettymapp.osm import get_osm_geometries\nfrom prettymapp.plotting import Plot\nfrom prettymapp.settings import STYLES\n\naoi = get_aoi(address=\"Praça Ferreira do Amaral, Macau\", radius=1100, rectangular=False)\ndf = get_osm_geometries(aoi=aoi)\n\nfig = Plot(\n    df=df,\n    aoi_bounds=aoi.bounds,\n    draw_settings=STYLES[\"Peach\"],\n).plot_all()\n\nfig.savefig(\"map.jpg\")\n```\n\nYou can also plot exported OSM XML files e.g. from openstreetmap.org:\n\n```python\nfrom prettymapp.osm import get_osm_geometries_from_xml\n\ndf = get_osm_geometries_from_xml(filepath=\"Berlin.osm\")\naoi_bounds = df.total_bounds\n...\n```\n\n**Customize styles \u0026 layers**\n\nEdit the `draw_settings` input to create your own custom styles! The map layout can be further customized with the additional arguments of the [`Plot`](prettymapp/plotting.py#L24) class (e.g. `shape`, `contour_width` etc.). Check the webapp [examples](streamlit-prettymapp/examples.json) for inspiration.\n\n```python\nfrom prettymapp.settings import STYLES\n\ncustom_style = STYLES[\"Peach\"].copy()\ncustom_style[\"urban\"] = {\n    \"cmap\": [\"#3452eb\"],\n    \"ec\": \"#E9724C\",\n    \"lw\": 0.2,\n    \"zorder\": 4,\n}\n\nfig = Plot(\n    df=df,\n    aoi_bounds=aoi.bounds,\n    draw_settings=custom_style,\n    shape=\"circle\",\n    contour_width=0,\n).plot_all()\n\n```\n\nYou can also customize the selection of OSM landcover classes that should be displayed! Customize the \ndefault settings or create your own dictionary! See [settings.py](prettymapp/settings.py#L3) for the defaults.\n\n```python\nfrom prettymapp.settings import LANDCOVER_CLASSES\n\ncustom_lc_classes = LANDCOVER_CLASSES.copy()\ncustom_lc_classes[\"urban\"][\"building\"] = False # drops all building subclasses\ncustom_lc_classes[\"grassland\"][\"leisure\"] = True # Include all leisure subclasses\ncustom_lc_classes[\"grassland\"][\"natural\"] = [\"island\"] # Selects only specific natural subclasses\n\ndf = get_osm_geometries(aoi=aoi, landcover_classes=custom_lc_classes)\n```","funding_links":[],"categories":["Python","Libraries"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrieke%2Fprettymapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrieke%2Fprettymapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrieke%2Fprettymapp/lists"}