Skip to content

Instantly share code, notes, and snippets.

View chrislkeller's full-sized avatar

Chris Keller chrislkeller

View GitHub Profile
@gotoplanb
gotoplanb / testrail-508-html
Last active August 29, 2015 14:00
508 checklist
* [ ] A1: Do images that convey contextual content have equivalent alternative text specified in the alt attribute of the img element?
* [ ] A2: Do images that are purely decorative, and not contextual, have empty, or null, alternative text specified, e.g. alt=""?
* [ ] A3: Does the alternate text convey contextual relevance to the page it is on?
* [ ] A4: Do images that convey complex content have longdesc attributes or equivalent text content available elsewhere on the page?
* [ ] A5: Does text content contained in images disappear when images are not available, i.e. is there text contained in the images?
* [ ] A6: Do image map area elements have the link destination correctly titled? If the title attribute is used, it ought not to duplicate the alt text.
* [ ] A7: Do form non-text controls, e.g. input type image, provide a text alternative that identifies the purpose of the non-text control?
* [ ] A8: Do noframes elements have appropriate equivalent or alternative content for user agents that do not suppor
cd ~/
# Add QGIS repo
sudo add-apt-repository -s "deb http://qgis.org/debian trusty main"
# Add TileMill repo
sudo add-apt-repository ppa:developmentseed/mapbox
# Update/upgrade
sudo apt-get update && sudo apt-get upgrade
@amandabee
amandabee / use_git.md
Last active August 29, 2015 14:03
You should use Git

Git is a version control system. Github is a proprietary hosting service that manages central git repositories. A git repository doesn't have to be public, but there are some great free hosts available if you do want to make your work available. Github, obviously, or Gitorious, especially if you're offended by github's ugly gender politics. Github's GUI is much nicer than any generalized Git GUI's I've seen, which is a vote for using Github, but it really doesn't matter.

So here are a few good reasons you should use git to manage teaching materials:

  • Greg Wilson explains it pretty well to a Python conference. You have to listen to him talk about a few other things first, but the whole talk is interesting so go ahead.

Any newsroom with an

@adelevie
adelevie / 239320.json
Last active August 29, 2015 14:04
~12,000 URLs needed to scrape all filings from FCC Docket No. 14-28 (Open Internet)
{"rows":[{"url":"http://apps.fcc.gov/ecfs/comment/view?id=6018210381","filer":"Daniel Hakimi","date_received":"Fri Jul 18 00:00:00 EDT 2014","filing_type":"COMMENT","pages":1},{"url":"http://apps.fcc.gov/ecfs/comment/view?id=6018210386","filer":"Sara Kopton","date_received":"Fri Jul 18 00:00:00 EDT 2014","filing_type":"COMMENT","pages":1},{"url":"http://apps.fcc.gov/ecfs/comment/view?id=6018210404","filer":"TechFreedom & International Center for Law & Economics","date_received":"Fri Jul 18 00:00:00 EDT 2014","filing_type":"COMMENT","pages":202},{"url":"http://apps.fcc.gov/ecfs/comment/view?id=6018210402","filer":"Paul Venderley","date_received":"Fri Jul 18 00:00:00 EDT 2014","filing_type":"COMMENT","pages":1},{"url":"http://apps.fcc.gov/ecfs/comment/view?id=6018210426","filer":"Matthew Newell","date_received":"Fri Jul 18 00:00:00 EDT 2014","filing_type":"COMMENT","pages":85},{"url":"http://apps.fcc.gov/ecfs/comment/view?id=6018210450","filer":"Michael Ehline","date_received":"Fri Jul 18 00:00:00 EDT 2014","fi
@JoeGermuska
JoeGermuska / gist:38765a72d7b8d443c0ce
Created August 1, 2014 20:01
An attempt to identify tables suitable for use with interpolation method to compute a median for aggregated geographies.

See censusreporter/census-aggregate#1 (comment) for more info.

whee. I think this is a pretty good distillation of tables which might go through the aggregation process which are complicated... this needs more eyes for sure.

Apparent pairs suitable for interpolation B01001 Sex by age (repeat for racial iterations) B01002 Median age by sex

B05003 Sex by Age by Nativity and Citizenship Status B05004 Median Age by Nativity and Citizenship Status by Sex

Solo data journalist tips and tools

Get to work

Keep lists of story ideas. Include both the simple one-shot stories as well as the bigger projects.

You're the only one doing your stuff, hence you're the only one who remembers how. Once you figure out a skill, document it! Write down a checklist, step-by-step, of how you finished that project. Having a place to start a new project is invaluable.

Start small. Do a simple locator map. A single bar graph or line chart. Then work your way up. Start with a silly project (like a dog name database, popular baby names over time) so -- if you make a mistake -- you won’t have to worry about getting sued. This helps reduce your stress level as you’re learning the ropes.

# Sometimes yosemite crashes with a gunicorn server up
# and when it comes back up there is a python process blocking port 8000
# kill that process with this function
# http://stackoverflow.com/questions/3855127/find-and-kill-process-locking-port-3000-on-mac
function killport() {
lsof -i TCP:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9
}
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active March 24, 2022 20:30
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@dannguyen
dannguyen / _README.md
Last active January 20, 2016 07:16
Scripts to autodownload and organize the California kindergarten immunization data files

Fetching and collating the California Kindergarten immunization data in Python and Bash

by Dan Nguyen @dancow

tl;dr: a quick example of practicing reproducible data journalism, and somewhat timely given the recent school vaccination law signed by California Gov. Jerry Brown

These are scripts that are part of the mundaneprogramming.github.io repo for SRCCON 2015 and will soon have their own entry/explanation on that site. They aren't meant to be best/canonical practices (e.g. I felt like using csv.DictWriter so there it is), nor do I guarantee that they work. But you're free to run them to see what happens. All they currently do is download the relevant spreadsheets and compile them into a file, which ends up being one of the most tedious parts of the entire investigation due to how the [files are organized on the home

@wboykinm
wboykinm / index.html
Last active June 8, 2017 14:26
Census dotmap using 1.) censusreporter.org for data, and 2.) turf.js for random points within a polygon
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>turfjs census dotmap</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0;}