Skip to content

Instantly share code, notes, and snippets.

View learning-things.md

A roundup of what the news nerds slack suggested for a reporter who was looking to up their data skills.

This is what I asked:

I had a question from a business reporter who was looking to up their data game in their own time, was thinking of either doing Python / PANDAS, or R, or maybe just upping their Excel skills. They're interested in learning how to do data exploration and maybe a little bit of scraping. They asked me for where to go to learn this and I didn't have a lot of good answers -- thought I'd ask here what people who have done the same thing can recommend.

And these are the responses:

Julia Wolfe

I did the coursera john hopkins data science program, it taught me R and helped give me a foundational introduction to data science, but that was a pretty decent time investment, so obviously not right for everyone

View nbc-news-data-graphics-intern.md

NBC News Data Graphics team intern

The Data/Graphics team at NBC News is responsible for explaining the news through visualizations and data analysis.

We build interactives, charts, maps, illustrations, graphics and more to tell the news in a compelling and thoughtful way. See our recent work: https://www.nbcnews.com/datagraphics

The intern should be interested in data visualizations and be an avid news reader. They should have an interest in data journalism and will help find stories that we could be telling in a new and visual way. They will also help create charts, maps and graphics for breaking news stories and for reported features.

Note that this internship is only available to those who will be current students at the time of the internship.

View keybase.md

Keybase proof

I hereby claim:

  • I am freejoe76 on github.
  • I am person09520 (https://keybase.io/person09520) on keybase.
  • I have a public key whose fingerprint is 7BE1 F63C 28C3 7A28 64E8 042B C6D2 2066 83F1 7FB0

To claim this, I am signing this object:

View download-until-successful-then-upload-then-quit.bash
#!/usr/bin/bash
URL='https://www.justice.gov/storage/report.pdf'
while [ True ]; do
RANDO=$(openssl rand -base64 40 | tr -dc 'a-zA-Z'; openssl rand -base64 40 | tr -dc 'a-zA-Z')
wget -O full-mueller-report.pdf "$URL?$RANDO"
if [[ $? -ne 8 ]]; then
# Upload it to wherever it belongs
say "We've got it"
break;
fi
View successful-vim-regexes.md

yessssssssss

:%s#<h2>\([^<]\+\)#<img src="assets/" alt="\1">\r<hr>\r<h2>\1#g
View csvkit-intro.md

Csvkit intro

A walk-through on slimming down a CSV, getting some information about its fields, slimming down the columns we're working with and pulling information about those columns.

https://csvkit.readthedocs.io/en/1.0.2/scripts/csvcut.html

High-level look at the spreadsheet

Csvkit can work slow on large CSVs, so for the sake of this walk-through we're going to work with 5,000 rows of the CSV.

@freejoe76
freejoe76 / table.html
Last active Oct 30, 2018
Semantic, accessible markup examples. More about table accessibility: https://webaim.org/techniques/tables/data
View table.html
<table>
<caption>Country populations, 2018</caption>
<thead>
<tr>
<th scope="col" abbr="">Country</th>
<th scope="col" abbr="">Population</th>
</tr>
</thead>
<tbody>
<tr>
@freejoe76
freejoe76 / dev-setup.md
Last active Oct 24, 2018
What I did when I got a new mac laptop
View dev-setup.md

What I did when I got a new mac laptop

August 2018

Install stuff

Install these programs

  • iTerm2
  • Firefox
    • Plugin: WebDeveloper
  • Opera
@freejoe76
freejoe76 / ny.md
Created Apr 17, 2018
State donations
View ny.md
  • Return a Gift to Wildlife
  • Missing and Exploited Children Fund
  • Breast Cancer Research and Education Fund
  • Prostate and Testicular Cancer Research and Education Fund
  • Alzheimer's Disease Fund
  • USOC/Lake Placid Olympic Training Center Fund
  • National September 11 Memorial
  • Volunteer Firefighting & EMS Fund
  • Teen Health Education Fund
  • Veterans Remembrance Fund
@freejoe76
freejoe76 / one-liner-js.md
Last active Nov 21, 2017
One-line javascript exercises
View one-liner-js.md

One-line javascript exercises

Each of these can be accomplished with one line of javascript.

  1. Create a variable and assign it the value explore (a string).
  2. Create a variable that's an array of two values (strings), red and blue.
  3. Create a variable that evaluates to the boolean true. Create another var, set it to 1. Compare the two (with javascript) and tell me whether javascript thinks they equal each other.
  4. Write a function named my_first_function that logs to console the word "hey". Name the function my_first_function. That line will start with function my_first....
  5. Edit that function so instead of logging to console, it "returns" the value "hey" ("return" is the name of the command you can use in a function that sends information back to whatever called the function). Call (run) the function and make sure it does what you think it does.
  6. Take your function from before and assign it to a variable named hey_maker. That line will start with var hey_maker.... Call it from the