@martinfleis@fosstodon.org
@martinfleis@fosstodon.org avatar

martinfleis

@martinfleis@fosstodon.org

Researcher in urban morphology & geographic data science. Open source software developer (GeoPandas, PySAL).

This profile is from a federated server and may be incomplete. Browse more on the original instance.

martinfleis, to python
@martinfleis@fosstodon.org avatar

Before @geopandas 1.0 is released, let's take a moment to revisit some of the common patterns that may not provide the best performance anymore. Starting a 🧵 with a few tips from our workshop from last year (all available as a notebook at https://github.com/martinfleis/efficient-geopandas-workshop/blob/main/GeoPython2023.ipynb).

Let's start with the creation of point geometry from coordinates. This is a common operation, but it's not always done in the most efficient way.👇

martinfleis,
@martinfleis@fosstodon.org avatar

Next is the conversion of Well-Known Text (WKT) or Well-Known Binary (WKB) to a GeoSeries. If you can avoid apply, do it.

The WKB option works the same way, just replace the last letter :).

martinfleis,
@martinfleis@fosstodon.org avatar

Sometimes, you may want to extract coordinates from your geometries. StackOverflow and chatGPT will likely push you towards a loop over individual geometries. Don't listen!

martinfleis,
@martinfleis@fosstodon.org avatar

If you want to avoid floating-point problems, you may want to round coordinates. Two bad examples and two good examples of how to do it. And believe me, I did not make the first one up. This is how I found them :).

martinfleis,
@martinfleis@fosstodon.org avatar

Specifying CRS in to_crs() or set_crs() required a dictionary with an "init" key. This has long been deprecated syntax. However, it is still far too common. There are many other ways to do the same thing.

martinfleis,
@martinfleis@fosstodon.org avatar

@robinlovelace Also fine, it does not have to be lower case. IO would agree with a preference of keeping the full code as it avoid confusions between EPSG and ESRI for example.

sgillies, to random
@sgillies@mastodon.social avatar

Resetting the "days since someone used ChatGPT to submit a nonsense bug report to one of my projects" counter to 0.

martinfleis,
@martinfleis@fosstodon.org avatar

@leahawasser @sgillies you haven’t seen those Leah? I’ve got a few based on “this code does not work, there must be a bug in your package” where the response is “this function/module does not exist in the package and never have” or similar. Fun times.

martinfleis,
@martinfleis@fosstodon.org avatar

@leahawasser Enjoy https://github.com/pysal/pysal/issues/1287. I had to lock that conversation in the end. I think this is the only conversation I have ever locked.

martinfleis,
@martinfleis@fosstodon.org avatar

@leahawasser I think this hits disproportionately more niche projects where LLM has less training data to work with so it hallucinates the results more often. It seen pandas code million times. But how often you come across mgwr code? Not much, but looks close to xyz, so let's mimic that…

martinfleis,
@martinfleis@fosstodon.org avatar

@leahawasser That is another pain. I've also noticed that in teaching, with folks using outdated stuff compared to what I was asking them to use. I’ve mostly seen outdated slower code that is working rather than outdated code that is broken because of that but we've been pretty conservative with breaking changes. But asking LLMs to do anything newer (e.g. libpysal.graph module) is not worth it. It is unable to pull the latest docs and reflect on it.

martinfleis,
@martinfleis@fosstodon.org avatar

@ocefpaf @leahawasser @sgillies Unless the newer search result is another LLM-generated crap instead of a piece someone actually wrote.

martinfleis,
@martinfleis@fosstodon.org avatar

@ocefpaf @leahawasser @sgillies Then you're stuck with the same old and potentially outdated information LLM has… there doesn’t seem to be a good solution :(.

terence, to random
@terence@fosstodon.org avatar

Tried to install ArcGIS Pro. Blah blah net runtime error. Fixed it.

Now I have to google how to bloody import a raster. And I still haven't managed to do it. I feel dumb.

Why am I doing this to myself? Because I want the Spilhaus projection, which neither R nor QGIS can do.

martinfleis,
@martinfleis@fosstodon.org avatar
martinfleis, to random
@martinfleis@fosstodon.org avatar

We have just released @geopandas 1.0.0-alpha1, the first of the pre-releases of the upcoming major version of the package 🚀. It comes with some changes you may notice in your workflows.

Here’s a short blog post highlighting the most critical bits - https://martinfleischmann.net/geopandas-1.0-is-coming.-what-will-change/

Please, help us test the pre-release and let us know if something doesn't look right!

pip install geopandas --pre -U  

🐍

martinfleis, to random
@martinfleis@fosstodon.org avatar

I just wrote a blog post about the upcoming @geopandas 1.0. It is happening folks, nearly 10 years after @kajord released 0.1 on PyPI (I’ve been around for about half of that). We’re becoming “stable”, whatever that means.

The post itself will come as soon as we manage to cut a pre-release. Take this as a teaser :). I’m just getting excited 🥳.

pyOpenSci, to python
@pyOpenSci@fosstodon.org avatar

Happy Saturday, #Python friends! What is everyone working on this weekend 👀

martinfleis,
@martinfleis@fosstodon.org avatar

@underdarkGIS @pyOpenSci Trajectools uses movingpandas under the hood?

martinfleis,
@martinfleis@fosstodon.org avatar

@underdarkGIS and @geopandas plays nice with QGIS?

martinfleis, to random
@martinfleis@fosstodon.org avatar

I just learned that my talk from PyData Prague from Oct '22 is now online. Some minor bits may have changed in the meantime but nothing significant.

"A Gentle Introduction to Spatial Data in the Pandas Ecosystem”

https://www.youtube.com/watch?v=Pm9lis-wCZs

Enjoy!

martinfleis, to random
@martinfleis@fosstodon.org avatar

🚨 Last 30 days to apply for one of the two fully funded positions in urban morphology & open spatial data science with me in a newly established research team at
Charles Uni in Prague.

📅 Deadline: March 13, 2024
⏳ Duration: 4 Years
🗓️ Start: October 2024

1️⃣Bridging urban morphology and community ecology to study structure, organisation and evolution of cities.
2️⃣Inequality of neighbourhood choice in regions of Central Europe

Details: https://uscuni.github.io/join/.

Come work with me!

martinfleis, to random
@martinfleis@fosstodon.org avatar

Can you give me good reasons to include type hints in Python packages I maintain? I have only a vague idea about their benefits but not enough to convince me it is worth the effort of adding to an existing, potentially large, codebase. Can someone add more to convince me (or ensure that I’m not missing out)? 🐍

martinfleis, to random
@martinfleis@fosstodon.org avatar

🚀 Two fully funded positions up for grabs! Dive into the world of urban morphology & open spatial data science with me in a newly established research team in Prague.

📅 Deadline: March 13
⏳ Duration: 4 Years
🗓️ Start: October 2024

1️⃣ Bridging urban morphology and community ecology to study structure, organisation and evolution of cities.
2️⃣ Inequality of neighbourhood choice in regions of Central Europe

Details: https://uscuni.github.io/join/.
Interested? Please get in touch with me (DM or email)!

martinfleis, to random
@martinfleis@fosstodon.org avatar

I have some personal news 🎉! The beginning of January marks the beginning of my journey as a researcher at Charles University. While I've been here for some time, this time, I am full-time with at least four years of funding.

It was a bumpy period since we moved back to Prague nearly two years ago, with me moving from academia and then back as I quickly realised that research is where I belong.

martinfleis,
@martinfleis@fosstodon.org avatar

Now, I am starting to build a small team focusing on data, cities, and open science. Stay tuned, as there will be funded PhD positions opening very, very soon! If you have an idea for collaboration, get in touch. There may be some bandwidth ;).

robinlovelace, to datascience
@robinlovelace@fosstodon.org avatar

Re-generating input datasets for our network merging methods + reproducible + geocomputation + visualisation for sustainable transport planning paper. 🏗️
If anyone knows of any good examples of 'braiding' like this let us know!

martinfleis,
@martinfleis@fosstodon.org avatar

@robinlovelace @underdarkGIS I had a lot of luck around Houston area.

waeiski, to random
@waeiski@vis.social avatar

I did not know edge bundling of trajectory data was such a niche use case, that it isn't widely adapted in Python.

I am trying to visualize some EU-wide mobility and edge bundling would be great. There are some cool non-geographic implementations around (Datashader, Holoviews), but they do not work well with geographic data and dataframes.

Luckily there are these obscure repositories with some implementations, but dunno whether I need to debug bunch of code.

martinfleis,
@martinfleis@fosstodon.org avatar

@waeiski maybe movingpandas can be of help?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • everett
  • InstantRegret
  • thenastyranch
  • magazineikmin
  • khanakhh
  • rosin
  • Youngstown
  • slotface
  • mdbf
  • cisconetworking
  • kavyap
  • cubers
  • DreamBathrooms
  • megavids
  • ngwrru68w68
  • Durango
  • osvaldo12
  • tacticalgear
  • modclub
  • normalnudes
  • Leos
  • ethstaker
  • GTA5RPClips
  • tester
  • anitta
  • provamag3
  • lostlight
  • All magazines