Skip to content

Instantly share code, notes, and snippets.

View CarlaAstudillo's full-sized avatar

Carla Astudillo CarlaAstudillo

View GitHub Profile
@CarlaAstudillo
CarlaAstudillo / nyc_arrests
Last active October 29, 2019 02:44
NYC arrests
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
@CarlaAstudillo
CarlaAstudillo / age_legislative_breakdown.csv
Created April 24, 2019 17:41
NJ State Legislature broken down by age
Entity 20 to 39 years 40 to 49 years 50 to 59 years 60 to 69 years 70 to 79 years 80 years and over
Senate 0.05 0.075 0.275 0.25 0.25 0.1
Assembly 0.1 0.125 0.3625 0.325 0.075 0.0125
NJ Residents 0.259 0.132 0.144 0.114 0.067 0.041
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 12 columns, instead of 1. in line 9.
zip,one_level,five_level,six_level,two_level,three_level,four_level,Total,max_level,max_num_returns,richest_lvl_pct,poorest_lvl_pct
00000,1406140.0,700990.0,331180.0,906970.0,587680.0,398740.0,4331700.0,"$1 under $25,000",1406140.0,0.0764549714893,0.324616201491
07001,2060.0,1100.0,130.0,1550.0,1140.0,910.0,6890.0,"$1 under $25,000",2060.0,0.0188679245283,0.298984034833
07002,11220.0,3860.0,790.0,7850.0,5070.0,2990.0,31780.0,"$1 under $25,000",11220.0,0.0248584015104,0.35305223411
07003,7630.0,3980.0,910.0,6190.0,4530.0,2840.0,26080.0,"$1 under $25,000",7630.0,0.0348926380368,0.292561349693
07004,1040.0,920.0,480.0,640.0,490.0,440.0,4010.0,"$1 under $25,000",1040.0,0.11970074813,0.259351620948
07005,2110.0,1650.0,990.0,1350.0,1040.0,780.0,7920.0,"$1 under $25,000",2110.0,0.125,0.266414141414
07006,2880.0,3020.0,2320.0,1770.0,1530.0,1150.0,12670.0,"$100,000 under $200,000",3020.0,0.183109707972,0.227308602999
07008,4670.0,1250.0,120.0,3020.0,1860.0,1080.0,12000.0,"$1 under $25,000",4670.0,0.01,0.389166666667
0
@CarlaAstudillo
CarlaAstudillo / chartitable_returns_by_zip.csv
Last active March 18, 2019 23:05
Charitable contributions according to tax returns in New Jersey by zip code
id Size of adjusted gross income Number of returns Total charitable contributions - Number of returns Total charitable contributions - Amount percent_charitable
07001 Total 6890.0 1970 4871 28.5921625544
07002 Total 31780.0 7620 22130 23.9773442417
07003 Total 26080.0 8440 23102 32.3619631902
07004 Total 4010.0 2010 5892 50.1246882793
07005 Total 7920.0 3570 12657 45.0757575758
07006 Total 12670.0 6700 30727 52.8808208366
07008 Total 12000.0 2860 7559 23.8333333333
07009 Total 6130.0 3290 11458 53.6704730832
07010 Total 11850.0 3630 12503 30.6329113924
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 14 columns, instead of 7. in line 9.
Corrected_town_2,OG_town,County,NJSP_CODE,Year,Area in square miles,Density per square mile,Character,Male police officers,Female police officers,Civilian,Total police employees,Geo_level,Est pop
Absecon City,Absecon City,Atlantic,001,2016,5.7,1459.1,Suburban,22,3,5,30,Municipality,8317
Atlantic City,Atlantic City,Atlantic,002,2016,11.84,3315.9,Urban Ctr.,240,38,119,397,Municipality,41608
Brigantine City,Brigantine City,Atlantic,003,2016,6.39,1440.4,Suburban,33,2,13,48,Municipality,13253
Buena Boro,Buena Boro,Atlantic,004,2016,7.4,612.7,Rural,9,0,2,11,Municipality,4534
Buena Vista Township,Buena Vista Township,Atlantic,005,2016,41.83,179.4,Rural,0,0,0,0,Municipality,7506
Corbin City,Corbin City,Atlantic,006,2016,8.3,59.3,Rural,0,0,0,0,Municipality,492
Egg Harbor City,Egg Harbor City,Atlantic,007,2016,10.89,389.3,Rural,9,2,1,12,Municipality,4239
Egg Harbor Township,Egg Harbor Township,Atlantic,008,2016,67.94,645.9,Rural,81,4,25,110,Municipality,43882
Estell Manor City,Estell Manor City,Atlantic,009,2016,53.75,
@CarlaAstudillo
CarlaAstudillo / Geocode_Open_Refine_Mapzen.md
Last active October 4, 2016 19:44
A quick tutorial on how to geocode thousands and thousands of addresses using Mapzen in Open Refine.

Geocode in Open Refine using Mapzen

Based on this tutorial...

(because Google API and Mapquest have 2,500 and 5,000 daily requests quotas, respectively. And sometimes, we want a little more.)

  1. Click on your address column -> Edit Column -> Add column by fetching URLs

  2. Name your new column 'mapzen_geo', and in the Expression box, put:

@CarlaAstudillo
CarlaAstudillo / IBTdatafellow.md
Last active June 14, 2016 19:54
Looking for a Paid Data Fellow at International Business Times

##International Business Times Data Journalism Fellow IBT Visual Example

We’re looking for a data fellow (paid!) at International Business Times with some data and coding skills. You’ll be working with me (yay!) reporting on data-driven stories and helping visualize them. You don’t have to be an expert at everything. Just be willing to dive in with some great data story and graphics ideas. We’re mostly looking for current students and recent graduates getting their start in journalism to fill this spot. This a 12-week opportunity that pays $12 per hour with a 40-hour week starting ASAP in our New York City office.

Here at IBT, we use all kinds of programming languages and tools to get the job done so it doesn’t matter to which one you prefer. More into R than Python? Great! Prefer Adobe Illustrator over D3.js? That’s great too. Interested in learning a new tool? We got you covered! Again, you don’t have to be an expert in every d

@CarlaAstudillo
CarlaAstudillo / gist:4f29b45e073dde8fa077f2858884116e
Created June 14, 2016 17:02
Looking for a paid data fellow at IBT, apply now!
We’re looking for a data fellow (paid!) at International Business Times with some data and coding skills. You’ll be working with me (yay!) reporting on data-driven stories and helping visualize them. You don’t have to be an expert at everything. Just be willing to dive in with some great data story and graphics ideas. We’re mostly looking for current students and recent graduates getting their start in journalism to fill this spot. More details found [here](http://ibtimes.applytojob.com/apply/mePEvM/Data-Journalism-Fellow)
Interested or know someone who would be a good fit? Send me a resume and a few sentences about yourself, what you do, what you know and would like to do/ learn at International Business Times. Also, please send me a link to a portfolio of your work. Github accounts work too!
Send it all to c.astudillo@ibtimes.com and you can also email me with any questions too.
@CarlaAstudillo
CarlaAstudillo / 0_reuse_code.js
Created April 7, 2016 01:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console