Skip to content

Instantly share code, notes, and snippets.

View stiles's full-sized avatar

Matt Stiles stiles

View GitHub Profile
@stiles
stiles / ne_asia.json
Created October 22, 2022 01:35
Topojson: North and South Korea
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can't make this file beautiful and searchable because it's too large.
id,conversation_id,text,source,in_reply_to_user_id,geo,retweet_count,reply_count,like_count,quote_count,date
1543379427505078273,1543379427505078273,"RT @spicetradeai: $1 in january is now $0.9618 due to inflation
CPI rose to 292.296 in May from 289.109 in April. To counteract inflation,…",Twitter for iPhone,,,10,0,0,0,2022-07-02
1543379333573554176,1543378085592137730,@davidjvickery Hehehehe,Twitter for iPhone,4790227152,,0,4,2,0,2022-07-02
1543378758135992320,1543378085592137730,@IcedKnife Have to keep the lights on,Twitter for iPhone,618539620,,0,0,17,0,2022-07-02
1543371121906462720,1543369905403088896,@WaspR6 Peoples champ,Twitter for iPhone,941797412380774400,,6,1,770,0,2022-07-02
1543369905403088896,1543369905403088896,Sit on my face and use my ears as handle bars.,Twitter for iPhone,,,3867,789,24854,2657,2022-07-02
1543318984933576705,1543318984933576705,"New lisitngs this week came in hot🔥
candidate raised_in_zips_won count
Donald Trump 40336130.0 1104
Joe Biden 65135275.0 434
@stiles
stiles / ca_counties.topo.json
Last active June 2, 2020 03:54
CA Counties Topojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stiles
stiles / warn_notice_types.csv
Created May 29, 2020 02:31
CA Warn Notice Types
Place Permanent Temporary Unknown
Los Angeles 226 1190 74
Statewide 704 2914 174
@stiles
stiles / county_total_jobs_change_after.geojson
Created May 26, 2020 15:18
CA County Total Non-farm Employment Change After COVID.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stiles
stiles / claimsout.geojson
Last active May 25, 2020 01:19
CA Unemployment Claims Pct Increase, By County
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stiles
stiles / totals_by_LA_zips.json
Created February 24, 2020 03:40
2nd District contributions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stiles
stiles / gist:b4571e7d5bba8df386c24fa8c735bda8
Last active February 23, 2020 19:42
2nd_district donations 2019 by LA ZIP codes
This file has been truncated, but you can view the full file.
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "zipcode": "90001", "name": "Los Angeles", "domcounty": "06037", "totpop_cy": 59907, "tothh_cy": 13454, "medage_cy": 27.1, "avghinc_cy": 46931, "avgval_cy": 377591, "tie": 0, "chan_jeong": 0, "herb_wesson": 2500, "jan_perry": 0, "holly_mitchell": 0, "jorge_nuno": 0, "albert_robles": 0, "total": 2500, "winner_dist_two": "Herb Wesson", "winner_total": 2500 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -118.247540000384006, 33.989080000253303 ], [ -118.247760000491994, 33.9893400001475 ], [ -118.247760000491994, 33.9886000017962 ], [ -118.256460000762004, 33.9886000017962 ], [ -118.256460000762004, 33.9893400001475 ], [ -118.259959999703995, 33.989290001891199 ], [ -118.259870000191, 33.987189999401103 ], [ -118.259809999916996, 33.985670000659603 ], [ -118.265190000272, 33.985630000776403 ], [ -118.265190000272, 33.981990001137198 ], [
@stiles
stiles / pandas.py
Last active December 30, 2021 19:40
Pandas cheat sheet
# List unique values in a DataFrame column
df['Column Name'].unique()
# To extract a specific column (subset the dataframe), you can use [ ] (brackets) or attribute notation.
df.height
df['height']
# are same thing!!! (from http://www.stephaniehicks.com/learnPython/pages/pandas.html
# -or-
# http://www.datacarpentry.org/python-ecology-lesson/02-index-slice-subset/)