Skip to content

Instantly share code, notes, and snippets.

View philipashlock's full-sized avatar

Philip Ashlock philipashlock

View GitHub Profile
@philipashlock
philipashlock / indicator_metadata-updates-08-2016.csv
Created August 31, 2016 21:46
SDG Indicator Metadata Updates from August 15th
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 3 columns, instead of 2. in line 5.
Description of Excel Flagged Discrepancy,CORRECT NAME: Final SDG List-UNSD (via Abdulla) Aug15 2016,INCORRECT OR MISFORMATTED NAME : NRP indicators names FROM WEB SITE (https://gsa.github.io/sdg-indicators/ as of Aug22 2016)
change needed in NRP name,3.1.1 Maternal mortality ratio,3.1.1 Maternal mortality ratio (per 100 000 live births)
TYPO in NRP site (decimal missing),3.6.1 Death rate due to road traffic injuries,3.6 Death rate due to road traffic injuries
change needed in NRP name,3.b.2 Total net official development assistance to medical research and basic health sectors,3.b.2 Total net official development assistance to the medical research and basic health sectors
change needed in NRP name,"5.4.1 Proportion of time spent on unpaid domestic and care work, by sex, age and location","5.4.1 Percentage of time spent on unpaid domestic and care work, by sex, age and location"
TYPO in NRP site name,5.c.1 Proportion of countries with systems to track and make public allocations for gender equality and womenÕ
GEOID GOVERNMENT_NAME CITY STATE_ABBR
1517000 HONOLULU HONOLULU HI
0947515 MILFORD MILFORD CT
0602132 ANGELS CITY ANGELS CAMP CA
1304204 AUGUSTA-RICHMOND COUNTY AUGUSTA GA
2500765 AGAWAM AGAWAM MA
2525100 FRANKLIN FRANKLIN MA
2519330 EASTHAMPTON EASTHAMPTON MA
1362720 PRESTON PRESTON GA
2147512 LONE OAK PADUCAH KY
@philipashlock
philipashlock / catalog-sample-extended.csv
Created November 24, 2015 23:30
Project Open Data Metadata Schema v1.1 as a CSV with dot delimited class names for fields
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
accessLevel,accrualPeriodicity,bureauCode,conformsTo,contactPoint.fn,contactPoint.hasEmail,describedBy,dataQuality,description,distribution.downloadURL,distribution.format,distribution.mediaType,identifier,issued,keyword,landingPage,language,license,modified,primaryITInvestmentUII,programCode,publisher.name,references,rights,spatial,systemOfRecords,temporal,theme,title,isPartOf
public,R/P1Y,018:10,http://www.agency.gov/widget-taxonomy/,Jane Doe,mailto:jane.doe@agency.gov,http://www.agency.gov/datasets/widgets-dictionary.html,true,This dataset provides national statistics on the production of widgets,https://data.agency.gov/datasets/widgets-statistics/widgets.csv,CSV,text/csv,http://dx.doi.org/10.7927/H4PZ56R2,2011-11-22,"widget,manufacturing,factory",http://agency.gov/widgets/data,en-US,http://creativecommons.org/publicdomain/zero/1.0/,2011-11-19T12:00:00Z,021-006227212,018:001,"Widget Services,Office of Citizen Services and Innovative Technologies,General Services Administration,U.S. Government","http://agen
@philipashlock
philipashlock / openstates-api-examples.php
Created January 24, 2012 22:21
Functions to get both legislators and district boundaries from teh OpenStates API
<?php
$state_legislators = $this->state_legislators($data['latitude'], $data['longitude']);
$state_chambers = $this->process_legislators($state_legislators);
function state_legislators($lat, $long) {
$url = "http://openstates.org/api/v1/legislators/geo/?long=" . $long . "&lat=" . $lat . "&fields=state,chamber,district,full_name,url,photo_url&apikey=" . $this->config->item('sunlight_api_key');
@philipashlock
philipashlock / performance-gov-themes.txt
Last active August 29, 2015 14:17
Performance.gov Themes
Administration of Justice
Agriculture
Commerce and Housing Credit
Community and Regional Development
Economic Security and Policy
Education, Training, Employment, and Social Services
Energy
General Government
General Science, Space, and Technology
Health
@philipashlock
philipashlock / national-data-book-taxonomy.txt
Created March 26, 2015 17:45
National Data Book Taxonomy
1. Population
2. Births, Deaths, Marriages, and Divorces
3. Health and Nutrition
4. Education
5. Law Enforcement, Courts, and Prisons
6. Geography and Environment
7. Elections
8. State and Local Government Finances and Employment
9. Federal Government Finances and Employment
10. National Security and Veterans Affairs
@philipashlock
philipashlock / pod-schema-v1.1-draft-example-minimal.json
Last active August 29, 2015 14:08
Project Open Data schema minimum example - v1.1 draft
{
"conformsTo": "https://project-open-data.cio.gov/v1.1/schema",
"dataset": [
{
"accessLevel": "public",
"bureauCode": [
"018:10"
],
"contactPoint": {
"fn": "Jane Doe",
@philipashlock
philipashlock / datagov-dataset.html
Last active August 29, 2015 14:05
Schema.org Dataset Markup
<article itemscope itemtype="http://schema.org/Dataset" class="module prose">
<header class="module-content page-header">
<ul class="nav nav-tabs">
<li class="active">
<a href="/dataset/real-estate-across-the-united-states-rexus-lease"> Dataset</a>
</li>
</ul>
</header>
@philipashlock
philipashlock / index.html
Created February 21, 2014 21:41
MIME regex test
<html lang="en">
<head>
<title>MIME regex</title>
</head>
<body>
<pre>
<script type="text/javascript">
@philipashlock
philipashlock / index.html
Created January 30, 2014 20:57
Census Tiger Availability
Source: <a href="http://www.census.gov/geo/maps-data/data/tiger-line.html">http://www.census.gov/geo/maps-data/data/tiger-line.html</a>
<ul>
<li>Shapefiles are released in one of three types of coverages:
<ul>
<li>Nation-based </li>
<li>State-based </li>
<li>County-based</li>
</ul>
</li>