Skip to content

Instantly share code, notes, and snippets.

@manassra
manassra / command.sh
Last active May 29, 2018 11:18
Ogr2Ogr Shapefile (.shp) to GeoJSON (.geojson)
ogr2ogr -f GeoJSON -t_srs crs:84 counties.geojson cb_2017_us_county_20m/cb_2017_us_county_20m.shp
@manassra
manassra / join-labor-force-with-shapefiles.py
Last active May 29, 2018 11:29
Joining Labor Force Data with the Shapefiles of Counties
import sys
import json
import csv
data = {}
geojson = {}
## Step 1: Load the labor force data set, and store into a dictionary
## based on the state and county codes
with open('labor-force.csv', 'r') as f:
@manassra
manassra / guid.cpp
Created May 27, 2015 19:09
Create GUID String (C++)
/////////////////////////////////////////////
/// using CoCreateGuid ///
///////////////////////////////////////////
GUID guid;
std::string guidString;
HRESULT hr = CoCreateGuid(&guid);
if (SUCCEEDED(hr))
{
stringstream stream;
stream << std::hex << std::uppercase