{"id":15359122,"url":"https://github.com/leouieda/python-hawaii-2017","last_synced_at":"2025-04-15T07:22:08.440Z","repository":{"id":152042038,"uuid":"83261748","full_name":"leouieda/python-hawaii-2017","owner":"leouieda","description":"Introduction to Python workshop in the Department of Geology and Geophysics at the University of Hawaii at Manoa","archived":false,"fork":false,"pushed_at":"2017-04-27T20:31:49.000Z","size":13280,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T17:47:53.992Z","etag":null,"topics":["earth-science","geology","geophysics","geoscience","matplotlib","numpy","python","scipy","workshop"],"latest_commit_sha":null,"homepage":"http://www.leouieda.com/blog/python-hawaii-2017.html","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leouieda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-02-27T02:54:50.000Z","updated_at":"2023-11-13T04:28:15.000Z","dependencies_parsed_at":"2023-04-22T11:39:09.737Z","dependency_job_id":null,"html_url":"https://github.com/leouieda/python-hawaii-2017","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"d273e2a0085a033047d4b2582e73fc5fd95e31c2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leouieda%2Fpython-hawaii-2017","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leouieda%2Fpython-hawaii-2017/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leouieda%2Fpython-hawaii-2017/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leouieda%2Fpython-hawaii-2017/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leouieda","download_url":"https://codeload.github.com/leouieda/python-hawaii-2017/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249024073,"owners_count":21200031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["earth-science","geology","geophysics","geoscience","matplotlib","numpy","python","scipy","workshop"],"created_at":"2024-10-01T12:43:52.644Z","updated_at":"2025-04-15T07:22:08.396Z","avatar_url":"https://github.com/leouieda.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction to Python Workshop at UH Manoa\n\n**Instructor:** [Leonardo Uieda](http://www.leouieda.com)\n\n**When**:\nApril 17, 19, and 20. 4:30pm - 6:30pm\n\n**Where**:\nRoom 703 in the POST building. Department of Geology and Geophysics.\n\n**What**:\nWe will teach a hands-on introduction to the [Python](https://www.python.org/)\nprogramming language.\nYou **will not** fall asleep with PowerPoint slides full of code,\ncalculate Fibonacci numbers, organize lists of names, print\nall odd numbers between 0 and 30, or any of that programmer nonsense.\nYou **will** write code from the start, work in pairs/groups, download data\nfrom the internet, load data, perform linear regressions, make figures and\nmaps, and other things that you will actually need to do on a daily basis.\n\n**Bring**:\nParticipants must bring their own **computers** (Mac, Windows, or Linux) with the\nrequired **software already installed** (see [What to install](what-to-install)\nbelow).\n[Contact me](http://www.leouieda.com/contact/) if you need any help **before**\nthe workshop.\n\n\n## Goals\n\nThis is going to be a hands-on workshop of the basic concepts you'll need to\nuse Python for your research and studies.\nParticipants who complete the workshop should be able to use Python to gather\ndata from one or more files, process the data, run an analysis, make\npublication quality figures, and save the output.\n\n\n## Schedule\n\n| **Topics** |\n|:-----------|\n| **Day 1** |\n| *Introductions* |\n| First steps: Opening Python and running code |\n| The Jupyter notebook |\n| Documentation using Markdown |\n| Using variables to store data |\n| **Day 2** |\n| *Recap* |\n| Built-in functions and getting help |\n| The power of libraries |\n| Loading data with numpy |\n| Computing with numpy arrays |\n| Making plots with matplotlib |\n| **Day 3** |\n| *Recap* |\n| Repeating actions with `for` loops |\n| Specifying conditions with `if` statements |\n| Making your own functions |\n| Bonus: Artisanal data input |\n| Bonus: Analysing our data with `numpy` and `scipy` |\n\n\n## Shared class notes\n\nWe'll use Google Docs to edit shared class notes.\nPlease keep the document open during class.\nYou can post questions/comments/whatever on the notes or\non the group chat.\n\n1. [Notes for day 1](https://docs.google.com/document/d/1cfmbCcUbqQZJHqEPifhVT5hC07r0LHNTwIlckaj5gRk/edit?usp=sharing)\n2. [Notes for day 2](https://docs.google.com/document/d/1i1daJKs6qrqtVEjxLSGd69Atay2UYujTn2YXVB_-FjU/edit?usp=sharing)\n3. [Notes for day 3](https://docs.google.com/document/d/1amWSLCPh1EkjpfAdaE3-TUus1Apdjr_d-oC3Z-eL93s/edit?usp=sharing)\n\n\n## Data\n\nThroughout the workshop, we will work with temperature data from\n[Berkeley Earth](http://berkeleyearth.org/).\n\n[![](http://berkeleyearth.lbl.gov/auto/Regional/TAVG/Figures/global-land-TAVG-Trend.png)](http://berkeleyearth.lbl.gov/regions/global-land)\n\nWe'll start working with the time series of [average temperature in\nHawaii](http://berkeleyearth.lbl.gov/regions/hawaii) and try to reproduce the\nfigure from the website using Python tools.\n\nNext, we will automatically download the temperature time series for a list of\ncountries, make plots, and run some analysis on the data.\n\nThe data files are available in the `data` folder just in case we have network\nproblems.\nThe files were downloaded using the script `download-data.py` which is what we\nwould write on day 2.\n\n\n## What to install\n\nThere are many ways to get Python on your system and it can be very confusing\nwhen you're first starting out.\nI **don't** recommend downloading it from python.org or using the Python that\ncame with your system (common on Linux).\nInstead, **use the Anaconda distribution**.\nIt will come with all the libraries you'll need and doesn't require\nadministrative access to install.\n\nGo to https://www.continuum.io/downloads and select the **Python 3.6** version\nof the installer for your system.\nIt's safe to use all the default configuration options when installing.\n\n**Even if you already have Python** (say from your system package manager or\nArcGIS, etc), I recommend that you install Anaconda to avoid problems with\nversioning.\n\nYou'll also need a **text editor**. If you don't already have one of your\nchoice, I recommend installing [Sublime Text](https://www.sublimetext.com/)\n(it's available for Linux, Windows, and Mac).\n\n**Please install all software BEFORE comming to the workshop.** If you have any\nproblems installing or don't know which version you need to download,\n[come talk to me](http://www.leouieda.com/contact/).\n\n\n\n## Recommended Literature\n\nWe will loosely follow the Python lessons from\n[Software Carpentry](https://software-carpentry.org/).\nI highly recommend taking a look at all of their material.\nEverything there is worth learning.\n\nSee this blog post for more resources for getting started in Python:\nhttp://www.leouieda.com/blog/getting-started-with-python-for-science.html\n\nTo perfect your Python-fu, I highly recommend trying to solve the\n[Python Challenge](http://www.pythonchallenge.com/).\nIt's a fun way to learn general Python skills, like parsing text, downloading\nweb content, regular expressions, and much more.\nThe challenges are usually very difficult but also very rewarding when you can\ncomplete them.\n\n\n## License\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eThis content is licensed under a\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003eCreative Commons Attribution 4.0 International License\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleouieda%2Fpython-hawaii-2017","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleouieda%2Fpython-hawaii-2017","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleouieda%2Fpython-hawaii-2017/lists"}