Skip to content

Instantly share code, notes, and snippets.

View stepps00's full-sized avatar

Stephen Epps stepps00

View GitHub Profile
@stepps00
stepps00 / combined_wof_and_pelias_postalcode_export.txt
Created January 12, 2021 22:51
Combination of Pelias and WOF postalcode exports
This file has been truncated, but you can view the full file.
00501 [{'Holtsville': 1}]
00802 [{'St. Thomas': 1}]
00902 [{'San Juan': 1}]
01001 [{'Agawam': 731}, {'Agawam Town': 20}, {'Chicopee': 2}, {'North Hatfield': 1}]
01002 [{'Amherst': 1062}, {'Amherst Center': 121}, {'Pelham': 39}, {'Hadley': 3}, {'Agawam': 2}, {'Ludlow': 1}, {'North Amherst': 1}]
01003 [{'Amherst Center': 138}, {'Amherst': 5}]
01004 [{'Amherst': 1}, {'Amherst ': 1}, {'Amherst Center': 1}]
01005 [{'Barre': 193}, {'Southwick': 1}, {'South Barre': 1}]
01007 [{'Belchertown': 476}, {'Whately': 8}, {'Southwick': 2}, {'Warren': 1}]
01008 [{'Blandford': 37}]
@stepps00
stepps00 / wof_postalcode_export.txt
Created December 30, 2020 18:19
Export of WOF postalcodes in venue data
This file has been truncated, but you can view the full file.
postalcode locality_matches
00501 [('Holtsville', 1)]
00802 [('St. Thomas', 1)]
00902 [('San Juan', 1)]
01001 [('Agawam', 731), ('Chicopee', 2), ('North Hatfield', 1)]
01002 [('Amherst', 1062), ('Pelham', 33), ('Hadley', 3), ('Agawam', 2), ('Ludlow', 1)]
01003 [('Amherst', 5)]
01004 [('Amherst', 1), ('Amherst ', 1)]
01005 [('Barre', 183), ('Southwick', 1), ('South Barre', 1)]
01007 [('Belchertown', 447), ('Whately', 8), ('Southwick', 2), ('Warren', 1)]
@stepps00
stepps00 / pelias_postalcode_export.txt
Created December 30, 2020 00:30
Export of Pelias' USA postalcode file
postalcode locality_matches
98937 [('Naches', 5), ('Yakima', 1)]
98939 [('Parker', 1)]
98941 [('Roslyn', 1)]
98942 [('Selah', 21)]
98943 [('South Cle Elum', 2)]
98944 [('Sunnyside', 13)]
98948 [('Toppenish', 5)]
98950 [('Vantage', 3)]
98951 [('Wapato', 2)]
@stepps00
stepps00 / proposed_tilezen_kind_definitions.csv
Created August 27, 2020 00:18
proposed tilezen kind definitions
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 10.
"TILEZEN KIND","NAME","WIKIDATA ID","TILEZEN / VERRAZANO DEFINITION"
"accounting","accounting","Q4116214","An office that measures, processes, and communicates about financial information."
"animal_service","animal service","","A place that offers pet boarding or other services."
"animal_shelter","animal shelter","Q1411287","A place that houses and disposes of homeless, lost, or abandoned animals."
"art_service","art service","","A shop or agency that provides artwork for advertisements or marketing."
"art_studio","art studio","Q746628","A working place for artists, typically to create fine art, paintings, or sculptures."
"auditorium","auditorium","Q230752","An amenity where an audience can hear and watch performances."
"baby_goods","baby goods","","A shop selling products for newborns and babies."
"ballroom","ballroom","Q805353","An amenity or other large room designed for formal dancing or any room in which balls are routinely held."
"bbq_grill","bbq grill","Q461696","An amenity for cooking meat or other fo
@stepps00
stepps00 / existing_tilezen_kind_definitions.csv
Created August 27, 2020 00:14
existing tilezen kind definitions
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
"TILEZEN KIND","NAME","WIKIDATA ID","TILEZEN / VERRAZANO DEFINITION"
"accountant","accountant","Q326653","An office responsible for preparing finances, billing, and payroll-type services."
"adit","adit","Q58917","A man-made, horizontal entrance shaft to an underground mine."
"administrative","administrative","Q304157","An office for government agencies and other support staff. It's better to use the government category instead."
"adult_gaming_centre","adult gaming centre","Q47521258","A place of leisure for adults with gaming machines, often with monetary payouts."
"advertising_agency","advertising agency","Q216931","An office that creates advertisements and/or placing them in third-party media publications."
"aerodrome","aerodrome","Q62447","An aeroway landuse area containing all runways, taxiways, passenger terminals, and other facilities for aircraft flight operations, for civilian and commercial airport use."
"aeroway_gate","aeroway gate","","An access door at an airport terminal used to board and disemba
@stepps00
stepps00 / state_to_zip_prefix_mapping.tsv
Created April 16, 2020 17:18
state to zip code prefix mapping
state zip_prefix
Alabama 35
Alabama 36
Alaska 995
Alaska 996
Alaska 997
Alaska 998
Alaska 999
Arizona 85
Arizona 86
@stepps00
stepps00 / all-centroids.geojson
Created April 11, 2020 05:30
all green data centroids
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stepps00
stepps00 / all-centroids.geojson
Created April 11, 2020 05:29
centroids-green-data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stepps00
stepps00 / dist_notes.md
Last active December 18, 2019 21:37
Creating WOF data distribution

This is a brief overview of Who's On First's wof-dist-build tool and what is needed to create a "combined" distribution file containing all of Who's On First's 260 admin repos. This tool can be used to combine other repositories, but with this example, we're only concerned with admin repositories.

Note that this also assumes you have various tools and repositories on your local machine before proceeding:

  • All 260 admin repositories
  • The most recent Go release (1.12+) installed
  • A clone of the go-whosonfirst-dist repository
  • Other supplemental Who's On First repositories (more details to follow...)

Lastly, all of this work assumes that all GeoJSON files in all repositories validate using the go-whosonfirst-validate tool, specifically with the -names flag envoked. This validation should not be an issue, but the tool should be run over all repositories before building the dist file.

#convert wma to mp3
for file in *.wma; do ffmpeg -i "${file}" -acodec libmp3lame -ab 192k "${file/.wma/.mp3}"; done