Skip to content

Instantly share code, notes, and snippets.

View psychemedia's full-sized avatar

Tony Hirst psychemedia

View GitHub Profile
@psychemedia
psychemedia / DEFRA AUR Data Downloader.ipynb
Last active March 28, 2023 10:50
DEFRA AUR Data Downloader - quick hack for downloading UK air quality data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / island_storytellers_constitution.md
Last active February 27, 2023 00:00
Island Storytellers Constitution

CONSTITUTION

Name

The name of the association is The Island Storytellers

Aims and Objectives of the Island Storytellers

1 To develop oral storytelling on the Isle of Wight

@psychemedia
psychemedia / db_tables.csv
Created December 19, 2012 19:15
NHS Shiny SitRep Viewer
id name
id_0 A&E closures
id_1 A&E diverts
id_2 Trolley-waits over 12 hours
id_3 Cancelled operations
id_4 Critical care transfers
id_5 Ambulances queuing
id_6 G&A beds
id_7 D&V, Norovirus
id_8 Delayed transfers of care
@psychemedia
psychemedia / nhs_parking_review.ipynb
Last active February 22, 2023 23:50
NHS car parking revenues
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / mkAccidents.ipynb
Last active January 26, 2023 14:24
Example of looking at MK road accidents in an IPython Notebook using stats19 data and folium wrapped leaflet maps.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / nb_sqlite_db.py
Last active December 9, 2022 22:42
Example of scraping md and code cells from Jupyter notebooks into sqlite db then doing text concordance on result
import os
def nbpathwalk(path):
''' Walk down a directory path looking for ipynb notebook files... '''
for path, _, files in os.walk(path):
if '.ipynb_checkpoints' in path: continue
for f in [i for i in files if i.endswith('.ipynb')]:
yield os.path.join(path, f)
import nbformat
@psychemedia
psychemedia / transkribus_py_api_notebook.ipynb
Last active December 5, 2022 13:57
Playing with the Transkribus python API - exploding lines of handwritten text into a notebook...
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / README.md
Last active November 24, 2022 02:06
How to load desktop CSV file into R/Sshiny app.

Minimal R shiny app demonstrating:

  1. how to upload a CSV file into an R/shiny app
  2. how to automatically populate list selectors based on column headers
  3. how to use optional list selectors
  4. how to populate a list selector with column names of numerical columns only
  5. how to use an action button to trigger an event when you're ready to do so

@psychemedia
psychemedia / Dockerfile
Last active November 10, 2022 15:52
First sketch of a contentmine dockerfile
FROM node:4.3.2
##Based on
MAINTAINER Tony Hirst
RUN apt-get clean -y && apt-get -y update && apt-get -y upgrade && \
apt-get -y update && apt-get install -y wget ant unzip openjdk-7-jdk && \
apt-get clean -y
@psychemedia
psychemedia / personality_disorder.ipynb
Created November 10, 2022 12:27
Attempt at personality disorder stats
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.