Skip to content

Instantly share code, notes, and snippets.

View larsyencken's full-sized avatar

Lars Yencken larsyencken

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larsyencken
larsyencken / fao_metadata.ipynb
Last active February 10, 2022 11:49
Our World In Data: metadata snapshot from FAO API
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larsyencken
larsyencken / 01-bigquery.py
Last active February 7, 2022 10:57
BigQuery cell magic for Jupyter notebook
# -*- coding: utf-8 -*-
#
# 01-bigquery.py
#
"""
Cell magic for executing BigQuery queries using %%bq and returning Pandas data frames.
Add BIGQUERY_PROJECT_ID to your environment specify a default project id. Otherwise, you can
specify one by setting PROJECT_ID in an earlier cell of your notebook.
@larsyencken
larsyencken / 2021-10-26 Daniel & Lars food exploring.ipynb
Last active October 26, 2021 12:20
OWID: Notebook exploring potential sharding options for a food explorer
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
entity cost_eur calories carbs carbs_sugar carbs_fiber fat protein
Bread 3.75 265.0 49.0 5.0 2.7 3.2 9.0
Oats 2.46 375.0 60.0 1.1 9.0 8.0 11.0
Rice 1.1 365.0 80.0 0.1 1.3 0.7 7.0
Cous Cous 1.65 338.0 70.5 0.4 4.2 0.4 11.6
Chickpeas 3.06 364.0 61.0 11.0 17.0 6.0 19.0
White beans 3.7 337.0 61.0 3.5 24.0 1.5 22.0
Peanuts (roasted, salted) 2.96 615.0 11.0 5.2 8.2 51.0 24.0
Peas 1.1
Apples 2.69 52.0 14.0 10.0 2.4 0.2 0.3
@larsyencken
larsyencken / 2021-09-07 WHO GHO API download.ipynb
Last active September 7, 2021 12:09
OWID: Jupyter notebook to download full data dump of the WHO Global Health Observatory's API
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larsyencken
larsyencken / 2021-08-23 Sqlite metadata.ipynb
Created August 23, 2021 11:34
OWID: Exploring metadata size in SQLite
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# -*- coding: utf-8 -*-
#
# 03-mysql.py
#
"""
Add MySQL magics. Needs MySQL credentials to be set in the environment
for this to work, and the "mysqlclient" package to be installed.
Add this file to the folder: