this post was submitted on 14 Nov 2024
32 points (100.0% liked)

Programming

17680 readers
149 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

My SO is interested in learning Python because she hopes it becomes useful in her work. She works with ArcGIS and/or QGIS and apparently it supports Python scripting so she's thinking about giving it a go.

She has no programming background so I was hoping you friends could suggest something for absolute beginners that would teach her both the Python and programming basics. It doesn't have to be very comprehensive, just something to get her started.

She has managed to get some scripts working through copy/pasting and minor adjustments but she lacks the foundations to really build a script of her own.

Thanks a lot!!

top 22 comments
sorted by: hot top controversial new old
[–] MorphiusFaydal@lemmy.world 17 points 1 month ago (1 children)

Automate the Boring Stuff with Python

Free to read on the authors website - https://automatetheboringstuff.com/

[–] pathief@lemmy.world 1 points 1 month ago* (last edited 1 month ago)

Looks great, thanks a bunch! EDIT: ordered it! :D

[–] starshipwinepineapple@programming.dev 5 points 1 month ago* (last edited 1 month ago) (1 children)

Second the Automate The Boring Stuff recommendation, especially if you're looking for a physical gift (or free online as mentioned)

Id also just in general recommend CS50-python as a free course for python. Engaging lectures, problem sets you can check your solutions, and you finish with a project of your own choosing. No programming background is needed. Don't buy a verified certificate, the whole course is free along with a free certificate

[–] pathief@lemmy.world 2 points 1 month ago

especially if you’re looking for a physical gift

Yep, it's a git! :)

[–] a1studmuffin@aussie.zone 5 points 1 month ago

The official Python tutorial is very well written and is suitable for total beginners:

https://docs.python.org/3/tutorial/

[–] Kache@lemm.ee 2 points 1 month ago

absolute beginner? Start at https://www.hedycode.com/

Which will ultimately lead into vanilla Python. This is the creator explaining why Hedy is uniquely designed for learning: https://www.youtube.com/watch?v=fmF7HpU_-9k

[–] moonpiedumplings@programming.dev 2 points 1 month ago* (last edited 1 month ago)
[–] AA5B@lemmy.world 2 points 1 month ago

She’s off to a great start! Most non-programmers starting off with python that I’ve seen are confused by the soaring and indexing rules, so can never get copy-pasted code to work

My older son always rebelled against programming, mostly because i thought he’d be great at it, but finally had to pick up some for a college class, I don’t know, stats or something. He became the programmer genius getting half the class to succeed, just because I drilled him on spacing and indenting

[–] ericjmorey@programming.dev 2 points 1 month ago* (last edited 1 month ago)

These two are my favorite balance of fundamentals and getting to purposeful application as quickly as possible (the first link is definitely not enough, but combined with the second she should be comfortable with the syntax and able to get basic things working):
https://www.kaggle.com/learn/intro-to-programming
https://www.kaggle.com/learn/python

This one takes its time with fundamentals and includes some projects to put them in context of building something. It's presented on Google Colab and Jupyter notebooks: https://allendowney.github.io/ThinkPython/

Working with GIS data means cleaning data. This one covers that and a lot of common analysis tools and techniques. But it assumes a bit of programming knowledge (Good to follow up after one of the options above): https://wesmckinney.com/book/

[–] umami_wasbi@lemmy.ml 2 points 1 month ago

Starting out with Python by Tony Graddis

I read the 3rd edition in library, now it's 6th. Don't know if it is as good as the memory serves.

[–] ProdigalFrog@slrpnk.net 2 points 1 month ago* (last edited 1 month ago)

Python Crash Course by Eric Matthes is a supremely good book to start with for an absolute beginner, and I would recommend it over Automate the boring stuff (that would be a great followup though!).

It assumes absolutely no prior knowledge, explains concepts extremely clearly, never presents too much to overwhelm and frustrate beginners, and includes a good range of projects that should interest any perspective programmer.

[–] MadhuGururajan@programming.dev 1 points 3 weeks ago

"Python for everybody" from Dr. Chuck. Has accompanying video lectures. Website PY4E.com

[–] GBU_28@lemm.ee 0 points 1 month ago* (last edited 1 month ago) (2 children)

Get the basics locked.in before dipping into GIS.

Edit, because someone misunderstood me.... You'll have an easier time extending your existing GIS work by getting a nice foundation of non GIS python skills.

There's a lot of odd patterns and domain specific requirements in the spatial data world, not even mentioning the nasty beast that esri is.

Provided you listen to my above advice, here are some other keywords that will help excite the home-gis dev: geopandas, (pandas), geojson, geopackage, QGIS, leaflet (not python but easy to connect a leaflet frontend with a python backend), openstreermaps, map box, earthexplorer (USGS free aerial imagery of lots of imagery types)

If it must be esri based, arcpy is a popular library.

[–] Wolf314159@startrek.website 2 points 1 month ago* (last edited 1 month ago) (1 children)

She already works in GIS and is looking to supplement that work with python. Python is used for more than geojson and web development in ArcGIS Pro. I've use it for constructing labels, simple field calculations, symbology, data processing etc. and in general ESRI makes it pretty simple to implement compared to the other terms you've listed. All she really needs to get started using Python with ESRI products is an simple python course and googling for some ArcGIS examples, which are pretty abundant. I remember taking one ages ago that ran the code in the browser, but I can't remember it now.

[–] GBU_28@lemm.ee 0 points 1 month ago* (last edited 1 month ago) (1 children)

Agree, I don't think I went against that. I certainly didn't say it's JUST geojson and web map. That was just a list of keywords. I opened by saying these are more things to get excited about.

If it's just esri (they said q too), but if it's just esri, automate the boring stuff + arcpy and you'll be a happy camper.

Cartographic stuff is super simple in any framework. Data processing and network topology are great things to study that aren't web map. Remote sensing is the coolest shit and you can literally get free imagery and use free tools to make surface analysis and identification...not as a super raw beginner, but not long after.

Learning about the common open source file formats, storage strategies, and processing libraries is attainable (and desirable) by a beginner who has automate the boring stuff under their belt

Jumping straight into esri and staying there, without getting some general education, is a good way to end up not knowing much about python, and generally developing weaker workflows.and automations, in my professional experience.

Like I said, learn some python basics and good habits, then consider gis.

[–] Wolf314159@startrek.website 0 points 1 month ago (1 children)

You totally missed the part where OP said she was looking into Python because she ALREADY WORKS IN GIS.

[–] GBU_28@lemm.ee 0 points 1 month ago* (last edited 1 month ago) (1 children)

Did not, I'm describing things you can do with gis across the spectrum, ESRI or not, preferably once you have a decent python foundation. Edit I and others are saying "do some non GIS projects in python FIRST, then explore these GIS related things." Because jumping to scripting in arc pro alone isn't advised.

Why are you being combative? I'm not hating on them at all. I literally just rattled off common file formats, libraries, and projects to consider. The original comment says they scraped a few things together from tutorials, and I and other comments are discussing how to build a strong foundation, then extend it.

I've got no ill will for OP.

Knowing how to script a bit in arc pro does not really mean you know anything about python, or programming for GIS at even a basic professional level. That's ok, no hate, everyone starts out. Checking out various software, formats and libraries, in addition to getting the python basics down will open a huge world of projects and even work opportunities

[–] Wolf314159@startrek.website 1 points 1 month ago (1 children)

I'm not the one being combative here. You're attitude is pretty condescending and alienating. Are you okay?

[–] GBU_28@lemm.ee 1 points 1 month ago

Absolutely not. I'm in line with others.

I suggested a basic python book, then listed topics to get into next. They didn't discount they already work in gis, it acknowledges they said they want to learn how to code and apply it to GIS.

[–] pathief@lemmy.world 1 points 1 month ago* (last edited 1 month ago) (1 children)

The short term goal is only to learn the absolute basics of programming. I only mentioned GIS to give some context on why I was narrowing down the language to python.

She's familiar with all the keywords you mentioned as she already works in GIS, just not as a developer.

[–] GBU_28@lemm.ee 1 points 1 month ago* (last edited 1 month ago)

Sweet I'd say automate the boring stuff is excellent.

My meaning was python plus those things is an awesome world of hobby and professional development, that's all. Lots of great projects can be even greater with python

[–] frankenswine@lemmy.world -1 points 1 month ago