Open utterances-bot opened 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.
@jurra Can you provide a link to the datasets to ThoTUM86?
@ThoTUM86 You have the files you need - that is a typo! We will fix it right now.
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
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.
@yvanmil are you stuck trying to create the new file tallest-mountains.txt?
Or, how to add data to the tallest-mountains.txt file?
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. :)
Observations:
README.md
file that provides background information about the content of the folder: the source of the data, the names of the variables stored in each file, licenses for the images included. The relation between the mountain names and the peak names is not made explicit in the README.md file. Could for a small dataset like this the names of the peaks for each mountain be specified? For a large dataset, I can imagine that the mountains could be specified in the data. This can also be determined based on geographic location.*-*.txt
or *-??.txt
. The former works better because it matches exactly two characters after the dash, so the newly created file tallest-mountains.txt will not be added if the command is run again.
awk 1 *-??.txt > tallest-mountains.txt
@cforgaci Nice use of the ? wildcard (matches exactly one character) to avoid an over-selection of files!
@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 :)
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.
@communisker That is another typo - you should indeed have data for the 10 tallest mountains in the world.
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.
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?
@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
@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") :)
@iamdeandrade here is some more information about Terminals in Jupyter Lab if you are curious: https://jupyterlab.readthedocs.io/en/stable/user/terminal.html
@aecryan If I understand correctly, there are multiple languages in programming.
@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/
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