Skip to content

Instantly share code, notes, and snippets.

View gschivley's full-sized avatar

Greg Schivley gschivley

View GitHub Profile
@gschivley
gschivley / gist:ca44422f0cf5de26cc1d9ea16a95fde3
Created September 8, 2021 21:11 — forked from jagregory/gist:710671
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]
@gschivley
gschivley / clusters.py
Last active June 11, 2020 20:26 — forked from ezwelty/clusters.py
PowerGenome: Prepare clusters and cluster profiles
import itertools
import pandas as pd
import numpy as np
import scipy.cluster.hierarchy
WEIGHT = "gw"
MEANS = [
"lcoe",
"interconnect_annuity",
"spur_miles",
@gschivley
gschivley / _NOTE.md
Last active March 26, 2020 11:54
FERC714_exploration.ipynb

Moved to github.com/gschivley/FERC_714

There has been more interest in this project than I first anticitpated, so I've moved this notebook to a full repository. The notebook in this gist will not be updated - all future changes will take place on the repo. You can fork the repo, submit pull requests, or open issues.

"""
Short script for loading/merging EIA860 generator, utility, and plant info.
Assumes that files are in the same folder as this script.
"""
import pandas as pd
util_fn = '1___Utility_Y2017.xlsx'
utility = pd.read_excel(util_fn, header=1, na_values=[' '])
@gschivley
gschivley / Luminance comparison.ipynb
Created June 8, 2018 18:07
Luminance comparison
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gschivley
gschivley / altair_app.py
Created May 13, 2018 18:32
Altair plot in Plotly Dash
# -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import pandas as pd
import sqlalchemy
import altair as alt
import io
from vega_datasets import data
@gschivley
gschivley / dash.css
Last active December 19, 2023 15:57
Dash styleguide by Chris P
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Plotly.js
- Grid
- Base Styles
- Typography
- Links
- Buttons
- Forms
- Lists
@gschivley
gschivley / Transform data to tidy.ipynb
Created February 7, 2018 15:24
Transform emissions data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gschivley
gschivley / LCA Discussion forum - Dynamic LCA.ipynb
Last active March 30, 2017 15:10
ghgforcing - LCA discussion forum presentation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.