You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sure @snowman2 i think i follow. The lessons in our textbook are focused on newer-ish users - this is an intermediate book. The idea behind this:
# Set working directory
os.chdir(os.path.join(et.io.HOME, 'earth-analytics', 'data'))
was that we'd have then always save data in their home/earth-analytics/data directory and then call the data from there. Are you suggesting rather than changing the directory we simply build paths like this:
OR using pathlib instead could work to generate a path to their home directory potentially. and then calling data from that explicit path?
# or do this with object oriented pathlib rather than just os
data_path = os.path.join(home_path, path-to-data-here)
thank you. i want to clarify because all of our lessons use this approach of changing the directory so it would be a big overhaul BUT i think i understand your point - changing the working dir makes it work on all machines but could be problematic in some scenarios.
Any clarification is helpful here. i appreciate it!
https://www.earthdatascience.org/courses/use-data-open-source-python/multispectral-remote-sensing/intro-naip/
I think it is better to build your path instead of
os.chdir
to prevent confusion. This is my opinion, so feel free to ignore if you disagree.Also, the examples could benefit from using pathlib.
The text was updated successfully, but these errors were encountered: