Lets-Plot

Elegant geospatial plotting

Computer Science Boutique
2 min readApr 26, 2021

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.

References

--

--