Giter Club home page Giter Club logo

cartes's Introduction

Cartes

build docs Code Coverage Checked with mypy Code style: black License
PyPI version PyPI downloads Conda version Conda Downloads

Cartes is a Python library providing facilities to produce meaningful maps.

Cartes builds on top of most common Python visualisation libraries (Matplotlib/Cartopy, Altair, ipyleaflet) and data manipulation libraries (Pandas, Geopandas) and provides mostly:

  • a comprehensive set of geographic projections, built on top of Cartopy and Altair/d3.js;
  • an interface to OpenstreetMap Nominatim and Overpass API. Result of requests are parsed in a convenient format for preprocessing and storing in standard formats;
  • beautiful default parameters for quality visualisations;
  • advanced caching facilities. Do not download twice the same content in the same day.

The cartes library is a powerful asset to publish clean, lightweight geographical datasets; and to produce decent geographical visualisations in few lines of code.

Gallery

More in the documentation

Installation

Latest release:

Recommended, with conda:

conda install -c conda-forge cartes

or with pip:

pip install cartes

Development version:

git clone https://github.com/xoolive/cartes
cd cartes
pip install .

Documentation

docs

Documentation available at https://cartes-viz.github.io/

cartes's People

Contributors

dependabot[bot] avatar xoolive avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cartes's Issues

Geometry missing while overpass shows the geometry

Hi I am trying to do this query where I have some admin_level=6 parts and some level=7:

sh_area = Overpass.request(
    area={"name": "Schleswig-Holstein", "admin_level": 4},
    rel=dict(boundary="administrative", admin_level=dict(regex="[6-7]")),
)

However I run into the issue that for some reason the admin_level=6 areas dont have data in the geometry column while on overpass they do get rendered as expected. https://overpass-turbo.eu/s/1pU9

image

image

Any ideas why this happens and how I fix this issue?

Bump into AttributeError: 'Series' object has no attribute 'is_empty' when trying to display simple things

Just trying to reproduce demos like airport layout.
It seems that
airport = Overpass.request(area=dict(iata="BRU"), aeroway=True)
does not fetch data. Possible? How can I check?
Then, for any simple display, it never goes through

if x.shape[0] > 0 and "geometry" in x.columns:
---> 75             x = x.query("geometry == geometry and not geometry.is_empty")
     76             if x.shape[0] > 0:
     77                 data.loc[x.index, ["latitude", "longitude"]] = x.assign(
     78                     longitude=lambda df: df.geometry.centroid.x,

with above error.
I have the feeling data is not fetch. How can I proceed to debug this?
Seems an Overpass issue, other osm stuffs go through (Nominatim, for example)
Thank you for double checking.

Python 3.10, pip installed traffic, cartes, no more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.