Skip to content

Instantly share code, notes, and snippets.

View pop_centroids.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mappingvermont
mappingvermont / famous_vermonters.js
Created Nov 28, 2021
Extract famous vermonters and their QIDs from wikipedia
View famous_vermonters.js
const wtf = require('wtf_wikipedia')
const rp = require('request-promise');
const createCsvWriter = require('csv-writer').createObjectCsvWriter;
const csvWriter = createCsvWriter({
path: 'famous_vermonters.csv',
header: [
{id: 'qid', title: 'qid'},
{id: 'name', title: 'name'}
]
View topcities.json
[
{
"name": "New York",
"qid": "Q60",
"iso_3166_1": "US",
"iso_3166_2": "US-NY",
"population": 8550405.0,
"qrank": 14995035.0,
"lat": 40.7308619,
"lon": -73.9871558
View building_intersections.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mappingvermont
mappingvermont / endpoint.geojson
Last active Dec 27, 2021
Finding best-fit zoom level given a shapely geometry
View endpoint.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mappingvermont
mappingvermont / format_election_results.py
Last active Jan 23, 2020
script to format tabular election CSV to GIS attribute table - all joining to county FIPS code
View format_election_results.py
import pandas as pd
import geopandas as gpd
def clean_source_data():
df = pd.read_csv('countypres_2000-2016.csv')
# remove year 2000 election results
df = df[df.year != 2000]
@mappingvermont
mappingvermont / cant_build_area.geojson
Created Sep 25, 2019
Example polygons that return null from Sieve(geom, <any_number>)
View cant_build_area.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mappingvermont
mappingvermont / dc_how_16th_st.geojson
Last active Sep 12, 2019
Houses of Worship on 16th St, DC
View dc_how_16th_st.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View stockton.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View admin0.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.