...
Slides
...
...
- Datacamp.com: Good, beginner-friendly and interactive courses on R (and Python). Very recommended - also check out my own course :-)
Exercise solutions day 1
...
- .
...
- Sometimes, data is accessible via an API
- The preferred data format of APIs is JSON
- JSON can be converted into CSV
- The preferred way of talking to an API is with code
...
- First approach: Scraping data
- Browse https://www.tecson-data.ch/zurich/tiefenbrunnen/index.php (as probably shown on Google)
- Select “windchill”, 2.11.2018/7.11.2018 and “all values” at the very bottom
- Copy stuff into Excel by hand and calculate median
- Second approach: Open Data Zürich / API:
- Browse https://tecdottir.herokuapp.com/docs/#/measurements
- Enter parameters
- Copy curl string and pipe into a file
- Upload JSON and paste into https://json-csv.com/ (bonus: use matrix style)
- Download CSV, open in Excel and calculate median (don’t forget to filter unneeded dates)
- Take-Aways:
- Copying and pasting stuff from HTML tables should be avoided
- Always look out for an API
- Try out different settings of your tools - they might bring you better results (“matrix style”)
- Get to know the terminal
- Excel / LibreOffice / OpenOffice have some good filters: get to know how to use them
- If you run out of queries, delete cookies
...