the-magnificents / 04-02-2021-Carpentry-for-HGIS

A carpentry workshop focused on Digital Humanities audience that works with Geospatial Data.
Other
2 stars 3 forks source link

04-02-2021-Carpentry-for-HGIS/01_Day_1_Unix_Shell/excercises/B1_exercise #52

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

Work with the bash shell — Python essentials for GIS learners

https://the-magnificents.github.io/04-02-2021-Carpentry-for-HGIS/01_Day_1_Unix_Shell/excercises/B1_exercise.html

ThoTUM86 commented 3 years ago

I did not have these files, or am I missing something? You can use ls to see the files in the cities_data/ folder, and cat to check out the contents of the newly created netherlands-cities.csv.

manuGil commented 3 years ago

@jurra Can you provide a link to the datasets to ThoTUM86?

aecryan commented 3 years ago

@ThoTUM86 You have the files you need - that is a typo! We will fix it right now.

jurra commented 3 years ago

Hi @manuGil the datasets are in the zip provided by Ashley via email, here is a link to the repository with the files: https://github.com/aecryan/pre_workshop_files

yvanmil commented 3 years ago

The hands-on workshop seemed clear, but this exercise is quite difficult. I didn't get the correct results and got stuck in step 3.

aecryan commented 3 years ago

@yvanmil are you stuck trying to create the new file tallest-mountains.txt?

aecryan commented 3 years ago

Or, how to add data to the tallest-mountains.txt file?

jurra commented 3 years ago

If you get stuck for more than 15 mins, you can look at the solution or join us in the zoom room. But the solutions hopefully will also help you understand after you tried on your own. :)

cforgaci commented 3 years ago

Observations:

aecryan commented 3 years ago

@cforgaci Nice use of the ? wildcard (matches exactly one character) to avoid an over-selection of files!

aecryan commented 3 years ago

@cforgaci regarding updating the README file, you can definitely add the names of the peaks for each mountain. The most important thing in documentation is to be clear and consistent - you can practice adding notes to the README.md file using nano :)

communisker commented 3 years ago

I follow the second step(solution: awk 1 *.txt > tallest-mountains.txt), then I have all data, which contains 10 mountains instead of 5 that indicated in the third step.

aecryan commented 3 years ago

@communisker That is another typo - you should indeed have data for the 10 tallest mountains in the world.

syan-007 commented 3 years ago
  1. Explore data files I see one readme.md file which explains the format of the data. Two .jpg and several .txt files are also inside.
  2. awk 1 *.txt > tallest-mountains.txt
  3. I used nano to add the command line: Nuptse,27.9675,86.8869,7864,5,12
MertenNefs commented 3 years ago
iamdeandrade commented 3 years ago

I got stuck on step 2, the code wasn't working on a terminal on my web browser Jupyter, but then I tried it on GitBash and it worked... what is that? I think I'm still confused about Jupyter and these different tools in which we can code.

komalp21 commented 3 years ago

in gitbash, if I type only cd and enter, the cursor goes to the next row, i cannot type or go back, how do i start a new command prompt?

aecryan commented 3 years ago

@komalp21 good question. The cd command must always be followed by a destination, and that destination must be directly "above" (..) or "below" the location/folder you are currently at in your file system. So, for example if you are on your Desktop and want to enter the py_workshop_2021 folder, you should do: cd py_workshop_2021

aecryan commented 3 years ago

@iamdeandrade It sounds like you are working on Windows - there are several shells ("terminals") that you can use to interact with your computer and the programs on it. The windows Powershell is also available in Jupyter Lab, but it doesn't "speak Bash". In order to give Bash commands (as in this lesson) you have to use GitBash or configure a different shell that is equipped to process Bash commands ("speaks the language") :)

aecryan commented 3 years ago

@iamdeandrade here is some more information about Terminals in Jupyter Lab if you are curious: https://jupyterlab.readthedocs.io/en/stable/user/terminal.html

yvanmil commented 3 years ago

@aecryan If I understand correctly, there are multiple languages in programming.

aecryan commented 3 years ago

@yvanmil Yes, there are many programming languages which each have a different "vocabulary" and "syntax" and communities that use them, almost just like spoken languages. In this workshop we are learning Bash and Python, but there are many more to explore: https://raygun.com/blog/programming-languages/