Elegant geospatial plotting

People recognize JetBrains for their IDEs and many other productivity tools. However, the company also contributes to the data science communities and has recently introduced two ggplot2 like libraries for Kotlin and Python programming languages.

ggplot2 is an R package and a system for declaratively creating graphics based on the Grammar of Graphics by Leland Wilkinson. It composes graphs by combining independent components (e.g., variables, scales, statistics, geometry, aesthetics), creating a rich ecosystem for visualizing data.

For more details, see:

As an illustration of ggplot API, consider Figure 1

Although the ggplot2 idiom is new to Kotlin, Python users have seen it in several libraries, most notably in plotnine. Jeroen Janssens even translated parts of R for Data Science into Python, which resulted in a fantastic plotnine tutorial.

The idea behind this article is to highlight the JetBrains contribution that extended the grammar to support interactivity and geospatial plotting with Lets-Plot, making charts like these possible:

In depth

The article now continues into the Datalore notebook, where we use Lets-plot, Geopandas, and Rtree to find the best valued Airbnb properties in Boston. Please follow along there:

In Conclusion

We have illustrated how Lets-plot (and ggplot2 API) makes it easy to create interactive geospatial charts in Python.




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store