🖼️ Create beautiful maps from OpenStreetMap data in a webapp

Overview

prettymapp 🖼️

Prettymapp is a webapp to create beautiful maps from OpenStreetMap data (based on prettymaps)


🎈 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.

Standalone Python package

In addition to the streamlit webapp, you can also use the Python package to create your own application or further customize the functionality.

Installation:

pip install git+https://github.com/chrieke/prettymapp.git

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="Brandenburger Tor, Berlin", distance=500, rectangular=True)
df = get_osm_geometries(aoi=aoi)

fig = Plot(
    df=df,
    aoi_bounds=aoi.bounds,
    draw_settings=STYLES["Peach"]
).plot_all()

To customize the map apperance, use the additional arguments of the Plot class (e.g. shape, contour_width etc.). Check the preconfigured styles and webapp examples for inspiration.

Comments
  • Requirements.txt updates

    Requirements.txt updates

    Recreating the requirements from my pc I get:

    attrs==21.4.0 certifi==2022.6.15 charset-normalizer==2.1.0 click==8.1.3 click-plugins==1.1.1 cligj==0.7.2 cycler==0.11.0 Fiona==1.8.21 fonttools==4.34.4 geopandas==0.11.1 idna==3.3 kiwisolver==1.4.4 matplotlib==3.5.2 munch==2.5.0 networkx==2.8.5 numpy==1.23.1 osmnx==1.2.1 packaging==21.3 pandas==1.4.3 Pillow==9.2.0 prettymapp==0.0.1 pyparsing==3.0.9 pyproj==3.3.1 python-dateutil==2.8.2 pytz==2022.1 requests==2.28.1 Rtree==1.0.0 Shapely==1.8.2 six==1.16.0 urllib3==1.26.11

    Please let me know if it is correct. Best regards

    opened by thomas75007 4
  • Index Issue

    Index Issue

    Hi,

    I am quite new to python, and I am trying to create a python script in Visual Studio. But I am receiving the following error message. Is there a solution?

    Many thanks Blake image

    opened by BlakeatFrasers 2
  • fix: pip install encoding error

    fix: pip install encoding error

    Hey, first off nice app :) but I got an encoding error installing it via pip.

    (venv) C:\Users\td\Desktop\prettymapp>pip install git+https://github.com/chrieke/prettymapp.git
    Collecting git+https://github.com/chrieke/prettymapp.git
      Cloning https://github.com/chrieke/prettymapp.git to c:\users\td\appdata\local\temp\pip-req-build-nc4pk_ft
      Running command git clone --filter=blob:none --quiet https://github.com/chrieke/prettymapp.git 'C:\Users\td\AppData\Local\Temp\pip-req-build-nc4pk_ft'
      Resolved https://github.com/chrieke/prettymapp.git to commit 34b75b5adce0a10a064344fbc2da449dfdcf29a3
      Preparing metadata (setup.py) ... error
      error: subprocess-exited-with-error
    
      × python setup.py egg_info did not run successfully.
      │ exit code: 1
      ╰─> [10 lines of output]
          Traceback (most recent call last):
            File "<string>", line 2, in <module>
            File "<pip-setuptools-caller>", line 34, in <module>
            File "C:\Users\td\AppData\Local\Temp\pip-req-build-nc4pk_ft\setup.py", line 12, in <module>
              long_description=parent_dir.joinpath("README.md").read_text(),
            File "C:\Program Files\Python39\lib\pathlib.py", line 1267, in read_text
              return f.read()
            File "C:\Program Files\Python39\lib\encodings\cp1252.py", line 23, in decode
              return codecs.charmap_decode(input,self.errors,decoding_table)[0]
          UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 19: character maps to <undefined>
          [end of output]
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed
    
    × Encountered error while generating package metadata.
    ╰─> See above for output.
    
    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.
    
    opened by tdiekel 1
  • pin osmnx subdependencies

    pin osmnx subdependencies

    pin osmnx subdependencies to avoid numpy version leading to partial rendering, see https://github.com/chrieke/prettymapp/issues/9

    Edit: The pinned numpy actually needs to go above osmnx in the requirements.txt. Accidentally pushed to master for that.

    opened by chrieke 0
  • Over resource limits on Streamlit Cloud

    Over resource limits on Streamlit Cloud

    opened by insight-nc 0
  • Hey! Could you check your PrettyMapp Streamlit App?

    Hey! Could you check your PrettyMapp Streamlit App?

    Hey there!

    Sorry for bothering you, just wanted to let you know that PrettyMap (https://chrieke-prettymapp-streamlit-prettymappapp-1k0qxh.streamlitapp.com/) has gone over its resource limits and we cannot use it anymore. Could you please check this for me? I really like you App by the way, thanks for giving it to everyone!

    opened by SofiaMap 0
  • Known issues FAQ

    Known issues FAQ

    Somer water areas are not shown or cut off

    OSM does not provide ocean geometries via the API (status proposed), this is why some coastal areas seem to cut off water area. No good solution as of right now.

    opened by chrieke 4
Releases(0.1.0)
Owner
Christoph Rieke
Geospatial Engineer
Christoph Rieke
:leaves: JavaScript library for mobile-friendly interactive maps

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 39 KB of gzipped JS plus 4 KB of gzipp

Leaflet 36.5k Jan 1, 2023
An open-source JavaScript library for world-class 3D globes and maps :earth_americas:

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics

Cesium 9.7k Dec 26, 2022
the easiest way to use Google Maps

Important If you're developer, I'm moving gmaps.js to NPM, you can give your opinion and check the migration progress in Issue #404 gmaps.js - A Javas

Gustavo Leon 7.1k Dec 28, 2022
Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.

Polymaps Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers. See http://polymaps.org for more details.

Urban Airship 1.6k Dec 23, 2022
UNMAINTAINED Open source JavaScript renderer for Kartograph SVG maps

This project is not maintained anymore. Here are a few reasons why I stopped working on kartograph.js: there's no need to support non-SVG browsers any

null 1.5k Dec 11, 2022
An open-source JavaScript library for world-class 3D globes and maps :earth_americas:

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics

Cesium 9.7k Jan 3, 2023
the easiest way to use Google Maps

Important If you're developer, I'm moving gmaps.js to NPM, you can give your opinion and check the migration progress in Issue #404 gmaps.js - A Javas

Gustavo Leon 7.1k Apr 7, 2021
This is a collection of over two hundred code samples an growing for the Bing Maps V8 web control.

Bing Maps V8 Code Samples This is a collection of over a hundred code samples for the Bing Maps V8 web control. These samples have been collected from

Microsoft 130 Dec 8, 2022
This project contains the TypeScript definitions for the Bing Maps V8 Web Control.

Bing Maps V8 TypeScript Definitions These are the official TypeScript definitions for the Bing Maps V8 Web Control. These can be used to provide intel

Microsoft 35 Nov 23, 2022
React components for Leaflet maps

React Leaflet React components for Leaflet maps. Documentation Getting started API reference Changes See the CHANGELOG file. Contributing See the CONT

Paul Le Cam 4.4k Jan 3, 2023
Vue 2 components for Leaflet maps

Vue2Leaflet Vue2Leaflet is a JavaScript library for the Vue framework that wraps Leaflet making it easy to create reactive maps. How to install npm in

Vue Leaflet 1.9k Dec 29, 2022
Converts geojson to svg string given svg viewport size and maps extent.

geojson2svg Converts geojson to svg string given svg viewport size and maps extent. Check world map, SVG scaled map and color coded map examples to de

Gagan Bansal 163 Dec 17, 2022
AngularJS directive to embed an interact with maps managed by Leaflet library

Angular Leaflet Why the fork? While we are grateful for all the original work at tombatossals/angular-leaflet-directive. We need to be able to operate

AngularUI 313 Nov 10, 2022
Downloads satellite images from Google Maps, only slightly illegal.

Google Maps Satellite Downloader This is a script to download satellite images from Google Maps. The below mentioned optimization system requires that

null 5 Oct 31, 2022
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.

Get Donate FIRO aEyKPU7mwWBYRFGoLiUGeQQybyzD8jzsS8 BTC: 3JZWooswwmmqQKw5iW6AYFfK5gcWTrvueE ETH: 0x90049dc59365dF683451319Aa4632aC61193dFA7 About A web

Simon Brazell 1.6k Dec 29, 2022
An online tool to generate and visualize maps for irregular and/or gapped LED layouts, for use with FastLED, Pixelblaze and other libraries.

An online tool to generate and visualize maps for irregular and/or gapped LED layouts, for use with FastLED, Pixelblaze and other libraries.

Jason Coon 172 Dec 8, 2022
Dashboards-maps is a frontend plugin that helps you in uploading custom GeoJSON to OpenSearch and communicates with the geospatial backend plugin for the same.

Welcome! Project Resources Code of Conduct License Copyright Dashboards-Maps Dashboards-maps is a frontend plugin that helps you in uploading custom G

null 9 Dec 28, 2022
Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL

Mapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It takes map styles that conform to the Mapbox Style Specif

Mapbox 9.4k Jan 7, 2023
Create and manage clusters for large amounts of markers

Google Maps JavaScript MarkerClusterer Description The library creates and manages per-zoom-level clusters for large amounts of markers. See the histo

Google Maps 95 Dec 27, 2022