Skip to content

Instantly share code, notes, and snippets.

@lakshmanok
lakshmanok / etl_geojson.py
Created July 17, 2019 18:19
How to load GeoJSON files to BigQuery
#!/usr/bin/env python3
# See: https://medium.com/@lakshmanok/how-to-load-geojson-files-into-bigquery-gis-9dc009802fb4
import json
with open('NUTS_BN_01M_2016_4326_LEVL_3.geojson', 'r') as ifp:
with open('to_load.json', 'w') as ofp:
features = json.load(ifp)['features']
# new-line-separated JSON
schema = None
for obj in features:
/**
* This Google Sheets script keeps data in the specified column sorted any time
* the data changes.
*
* After much research, there wasn't an easy way to automatically keep a column
* sorted in Google Sheets, and creating a second sheet to act as a "view" to
* my primary one in order to achieve that was not an option. Instead, I
* created a script that watches for when a cell is edited and triggers
* an auto sort.
*
@simzou
simzou / README.md
Last active February 14, 2025 22:57
US Map of Nielsen Media Markets