Skip to content

Instantly share code, notes, and snippets.

View shijithpk's full-sized avatar
📖
Giving myself the tools to become a better journalist

Shijith Kunhitty shijithpk

📖
Giving myself the tools to become a better journalist
View GitHub Profile
@shijithpk
shijithpk / bbc_update.py
Created January 24, 2024 20:49
script for updating spotify playlists of various bbc music shows
# contents of bbc_update_urls.csv
# show,episode_url,episode_date
# radio2_folk_show,https://www.bbc.co.uk/sounds/play/m001v4yp,2024-01-17
# radio6_new_music,https://www.bbc.co.uk/sounds/play/m001v50p,2024-01-19
# radio3_music_planet,https://www.bbc.co.uk/sounds/play/m001v3yn,2024-01-13
# radio1_best_new_pop,https://www.bbc.co.uk/sounds/play/m001v4rp,2024-01-19
# radio1_rock_show,https://www.bbc.co.uk/sounds/play/m001v2mp,2024-01-15
# radio6_the_morning_after_mix,https://www.bbc.co.uk/sounds/play/m001v4jv,2024-01-14
# radio1_the_chillest_show,https://www.bbc.co.uk/sounds/play/m001v2r0,2024-01-14
# radio6_gilles_peterson_show,https://www.bbc.co.uk/sounds/play/m001v4hp,2024-01-13
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shijithpk
shijithpk / india_states.geojson
Created March 31, 2023 15:12
india states map in geojson format. Converted from datameet shapefile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shijithpk
shijithpk / urban_bodies_temperature_rise.tsv
Created February 25, 2023 08:11
csv file showing rise in avg 2 pm surface temp for urban bodies in kerala (from 2008-12 to 2018-22)
authority_level local_body_name district rise_in_2pm_temp
municipality Erattupetta Kottayam 1.7
municipality Thrikkakara Ernakulam 1.6
municipality Thodupuzha Idukki 1.6
municipality Muvattupuzha Ernakulam 1.5
municipality Perumbavoor Ernakulam 1.4
municipality Pala Kottayam 1.4
municipality Ettumanoor Kottayam 1.4
municipality Paravur Ernakulam 1.4
municipal_corporation Kollam Kollam 1.2
@shijithpk
shijithpk / lulc_conversion.py
Last active January 13, 2023 09:03
Code for converting LULC image from Bhuvan WMS service into an xarray dataset and saving it as a netcdf file
# the lulc class codes will be in the 'class_new' band. What those codes represent can be seen in the url below
# https://bhuvan-vec2.nrsc.gov.in/bhuvan/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=application/json&WIDTH=20&HEIGHT=20&LAYER=lulc:KL_LULC50K_1112
# use the 'red_new', 'green_new' and 'blue_new' bands to visualise the data
# Be aware there will be a bhuvan watermark, usually bottom-right, tried to encode it as white (255,255,255)
# and lulc class code 99
from rasterio.io import MemoryFile
import requests
import json
import rioxarray