Skip to content

Instantly share code, notes, and snippets.

View russbiggs's full-sized avatar

Russ Biggs russbiggs

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js'></script>
<link href='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css' rel='stylesheet' />
</head>
@russbiggs
russbiggs / main.py
Created February 16, 2022 15:48
Create shapefile from OpenAQ API V2 locations endpoint
from urllib import request
import requests
import fiona
from fiona.crs import from_epsg
def result_to_dict(result):
geom = {
"type": "Point",
"coordinates": [
@russbiggs
russbiggs / index.html
Created February 9, 2021 20:21
NMDOH COVID-1 Vaccine by Race and Ethnicity
<html>
<body>
<table class="data-table">
<thead>
<tr>
<th>Race</th>
<th>Cumulative</th>
<th>Phase 1a</th>
<th>Phase 1b</th>
</tr>
@russbiggs
russbiggs / data.json
Created November 5, 2020 23:54
IMR-12 Compliance Change
[{"paragraphId":152,"change":0},{"paragraphId":14,"change":0},{"paragraphId":16,"change":0},{"paragraphId":17,"change":0},{"paragraphId":18,"change":0},{"paragraphId":19,"change":0},{"paragraphId":20,"change":0},{"paragraphId":21,"change":0},{"paragraphId":22,"change":0},{"paragraphId":23,"change":0},{"paragraphId":24,"change":0},{"paragraphId":25,"change":0},{"paragraphId":26,"change":0},{"paragraphId":27,"change":0},{"paragraphId":28,"change":0},{"paragraphId":29,"change":0},{"paragraphId":30,"change":0},{"paragraphId":31,"change":0},{"paragraphId":32,"change":0},{"paragraphId":33,"change":0},{"paragraphId":34,"change":0},{"paragraphId":35,"change":0},{"paragraphId":36,"change":0},{"paragraphId":37,"change":0},{"paragraphId":38,"change":0},{"paragraphId":39,"change":0},{"paragraphId":40,"change":0},{"paragraphId":41,"change":0},{"paragraphId":42,"change":0},{"paragraphId":43,"change":0},{"paragraphId":44,"change":0},{"paragraphId":45,"change":1},{"paragraphId":46,"change":0},{"paragraphId":47,"change":0},{"
@russbiggs
russbiggs / count.py
Created August 23, 2020 17:44
count duplicate USPS collection boxes by lat/lng
import pandas as pd
df = pd.read_csv("collection_boxes.csv")
df = df[['OUTLETID','LATITUDE','LONGITUDE']]
duplicates = df[df.duplicated(['LATITUDE','LONGITUDE'], keep=False)]
print(f'duplicates {duplicates.shape[0]}')
print(duplicates.groupby(by=['LATITUDE','LONGITUDE']).size())
@russbiggs
russbiggs / data.json
Created June 22, 2020 02:54
Oregon COVID-19 Data
{
"statewideTotal": 6572,
"statewideDeaths": 188,
"counties": [
{
"name": "Baker",
"cases": 1,
"deaths": 0
},
{
@russbiggs
russbiggs / delta.csv
Last active May 4, 2020 18:24
IMR 11 Compliance Change
paragraph_number change compliance
14 1 2
15 1 2
16 0 2
17 1 2
18 1 2
19 0 2
20 0 3
21 1 3
22 1 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
html, body {
height: 100%;
margin: 0;
@russbiggs
russbiggs / countries.json
Created November 23, 2019 20:48
World map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@russbiggs
russbiggs / index.html
Created November 14, 2019 18:29
leaflet draw syncing
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>