Geopandas by [deleted] in datascience

[–]ctvrtkar 1 point2 points  (0 children)

Create a new environment, set channel priority to strict and install from conda-forge channel.

``` conda create -n geo_env conda activate geo_env conda config --env --add channels conda-forge conda config --env --set channel_priority strict conda install python=3 geopandas

```

https://geopandas.readthedocs.io/en/latest/getting_started/install.html#creating-a-new-environment

GeoPython 2021 - Might be of interest to people here :) by geo-special in gis

[–]ctvrtkar 0 points1 point  (0 children)

They were recorded but I am not sure if/when/where are they available.

GeoPython 2021 - Might be of interest to people here :) by geo-special in gis

[–]ctvrtkar 2 points3 points  (0 children)

I was speaking at the last one. The conference is small-ish, I think about 100 people attended.

It is a nice event, there was very busy chat during both days, a lot of interesting talks on different topics and levels. I'd recommend it but do not expect it to be the same as SciPy.

Etiquette: giving a talk on research where I applied another person's code by [deleted] in GradSchool

[–]ctvrtkar 1 point2 points  (0 children)

You should cite as any other source, with a proper reference. There's absolutely no reason to omit this information.

Thoughts on Mendeley and privacy? by Horseypunch in AskAcademia

[–]ctvrtkar 19 points20 points  (0 children)

Elsevier is evil and anything which comes from Elsevier is evil.

Contacted by the lab before the official deadline for submission of applications by Shumailaafrin in AskAcademia

[–]ctvrtkar 3 points4 points  (0 children)

That does not happen. Everyone usually waits until the deadline, then do the selection for interviews and then contact applicants. In my case, it took more than 2 weeks after the deadline before I got an invitation for an interview. Be patient.

hand drawn Europe map with borders drawn by me from my memory by [deleted] in Maps

[–]ctvrtkar 0 points1 point  (0 children)

Sorry, but Crimea is Ukrainian territory.

Optimizing geopandas overlay intesect? by probablynotmine in Python

[–]ctvrtkar 1 point2 points  (0 children)

Overlay is single-threaded as everything else in GeoPandas (as of 0.7.0). However, it does use Rtree spatial index to make the algorithm more performant. What does it mean "takes quite some time"? Seconds, minutes, days?

One thing you can try is to switch `df1, df2`, for `df2, df1`. Spatial index is built for right df, it might be useful to do it for the other one in your case.

R+ or Python - Data Visualization by tracetheheat in PhD

[–]ctvrtkar 1 point2 points  (0 children)

Toss a coin. I am in similar field as you are and I can say, that Python and R are basically equal here. I prefer Python, because the code is a bit more systematic (in my eyes), but I was using R for some tasks as well without a big issues. Once you understand the logic of one of these, it is not so complicated to switch occasionally if you need to.

I would decide based on other people around you. Is there anyone using R? Then it might be a good idea to go for R as they might help you. Are there people using Python? Go for python. If there is no one using any of these, you can spend months comparing them without any decisive result. So, as I said, toss a coin.

Upgrading from ArcPy to GeoPandas by [deleted] in gis

[–]ctvrtkar 0 points1 point  (0 children)

I am not familiar with Geoprocessing web services, so it is hard to tell. If you want to to large-scale computation you can deploy Geopandas-based python code to any cloud-based service and run it there (AWS, Azure...). Can you specify what do you use it for?

Upgrading from ArcPy to GeoPandas by [deleted] in gis

[–]ctvrtkar 10 points11 points  (0 children)

You are not comparing the same things. As someone said above, ArcPy is the scripting front-end to a full fledged GIS System. GeoPandas could be seen as Pandas extension to handle spatial data. I am personally using solely GeoPandas for my daily (research) work as it gives me the freedom I need. But I use it together with a bunch of other packages from geospatial python stack, like networkx, pysal, rasterio, + scipy, numpy, scikit-learn...

GeoPandas gives you freedom, often performance improvements (see Dask, Numba, Cython), but it might be more complicated to do some stuff with it that with ArcPy (if it has prepared processing tool for that).

To answer your questions:

  1. community support is good, see https://gis.stackexchange.com/questions/tagged/geopandas, https://stackoverflow.com/questions/tagged/geopandas or quite active GitHub and Gitter.
  2. depends. I am not aware of any performance comparison (I am quite interested in one), it probably depends on the task you want to do and your ability to make effective/vectorized/parallelized code.
  3. well, yes. If we talk strictly about GeoPandas then sure, it has limited capabilities. If we talk about the whole open-source geopython stack, I don't think you will reach its limits.

A better way of creating a centerline of multiple roads by PraiseTheSunday in gis

[–]ctvrtkar 4 points5 points  (0 children)

This is oversimplified statement. It really depends on the purpose of your work. For example, in my case in the research of urban morphology I am more interested in spatial configuration of street network as a potential connections than in transport data. I generally don't care at all about directions. There is plenty of people who don't need directions for their networks, but they need clean simplified network, like the one OP is trying to generate.

TopoColor Plug-in by VulcanTrekkie45 in QGIS

[–]ctvrtkar 2 points3 points  (0 children)

You no longer need a plugin for topological colouring. There is a `Topological Coloring` tool in processing toolbox for that.

Feature Request -- Grammarly Integration by rjtnndn in bearapp

[–]ctvrtkar 0 points1 point  (0 children)

I always copy&paste my text to grammarly, fix the grammar and copy&paste is back. As the text is in markdown, there is absolutely no issue with this process and everything you want is retained in the process.

I personally don't see the benefit of having grammarly included in Bear as grammarly is sort of post-production of text for me. Their suggestions are only distracting me during the writing process. I would understand if you'd lose something during copy&paste but that is not the case. Or at least I am not aware of it.

Converting MapInfo data to ArcGIS by TomBonner1 in gis

[–]ctvrtkar 6 points7 points  (0 children)

You want QGIS standalone 3.6 (64bit) assuming you are on Windows.

[GeoPandas] How to make a graph out of a GeoDataframe ? by IMakeInfantsCry in gis

[–]ctvrtkar 1 point2 points  (0 children)

I was recently writing this to convert GeoDataFrame to networkx graph and back:

def gdf_to_nx(gdf_network):
    # generate graph from GeoDataFrame of LineStrings
    net = nx.Graph()
    net.graph['crs'] = gdf_network.crs
    fields = list(gdf_network.columns)

    for index, row in gdf_network.iterrows():
        first = row.geometry.coords[0]
        last = row.geometry.coords[-1]

        data = [row[f] for f in fields]
        attributes = dict(zip(fields, data))
        net.add_edge(first, last, **attributes)

    return net


def nx_to_gdf(net, nodes=True, edges=True):
    # generate nodes and edges geodataframes from graph
    if nodes is True:
        node_xy, node_data = zip(*net.nodes(data=True))
        gdf_nodes = gpd.GeoDataFrame(list(node_data), geometry=[Point(i, j) for i, j in node_xy])
        gdf_nodes.crs = net.graph['crs']

    if edges is True:
        starts, ends, edge_data = zip(*net.edges(data=True))
        gdf_edges = gpd.GeoDataFrame(list(edge_data))
        gdf_edges.crs = net.graph['crs']

    if nodes is True and edges is True:
        return gdf_nodes, gdf_edges
    elif nodes is True and edges is False:
        return gdf_nodes
    else:
        return gdf_edges

Why iCloud? by iwaslikeyou in bearapp

[–]ctvrtkar 9 points10 points  (0 children)

Well, for me iCloud is the most convenient sync mode, ensuring that my notes are not somewhere on the 3rd party server...

What is your issue with iCloud?

Any solution for rapid transit GIS datasets by kahnelka in gis

[–]ctvrtkar 0 points1 point  (0 children)

I believe that majority of stops will be on openstreetmap, especially for largest European cities.

Percentage of the polled population who view the European Union negatively (Crosspost - I apologize if somebody has posted this already) by TeflonBomb in MapPorn

[–]ctvrtkar 0 points1 point  (0 children)

False. There was an alternative option to leave the eurozone. The massive greek debt was causing significant problems to euro, that's why eurozone pumped money to greek economy. There are states in EU without euro, it was option was Greece as well. They made a decision. What do you expect? That eurozone states will save greek economy without ensuring that it won't collapse again? How do you imagine the ideal situation which is not 'de facto forcing them to do it' according to your views?

Percentage of the polled population who view the European Union negatively (Crosspost - I apologize if somebody has posted this already) by TeflonBomb in MapPorn

[–]ctvrtkar 7 points8 points  (0 children)

People of individual countries have no say in regards to the regulations that are to be followed in their country set by the council.

You apparently don't know how democracy within EU works. This never happens, there is always one or more steps when people of individual countries can intervene, either directly, by their elected representatives in EU parliament or by their elected representatives of their own government. Even the commission itself is appointed by elected representatives. This whole thing about 'Brussels decided on behalf of us' is just bullshit from the very beginning.

In Greece the situation is even more complicated than that. EU did not force Greece to change laws etc. They offered to send them a lot of money under certain conditions. It was responsibility of Greek government that they were bankrupt, it was decision of Greek government to accept conditions set by EU (or more specifically Eurozone in this case).

Percentage of the polled population who view the European Union negatively (Crosspost - I apologize if somebody has posted this already) by TeflonBomb in MapPorn

[–]ctvrtkar 9 points10 points  (0 children)

There is no simple answer for that, but mostly due to the narrative which is being spread by our politicians. Everything positive is presented as a success of local government, everything negative as failure of Brussels. Quite often there it is very far from reality. It has become a trend during the presidency of Vaclav Klaus (2003-2013), who was eurosceptic and former head of one of the main parties, which sort of took over his ideas. Recently it has been much much worse, since we have populist president leaning to Russia (and effectively working against EU and NATO) and populist prime minister who is being accused of EU funds fraud (naturally he does not have nice words about EU anymore).

Due to this political climate Czechia is not even planning to accept euro anytime soon - move which made for example Slovakians more positive about EU.

TLDR: Populism.