Skip to content

Instantly share code, notes, and snippets.

View RodriguezGoldstein's full-sized avatar

Jose Luis RodriguezGoldstein

View GitHub Profile
unnest_reg <- "([^A-Za-z_\\d#@']|'(?![A-Za-z_\\d#@]))"
replace_reg <- '(.*.)\\.com(.*.)\\S+\\s|[^[:alnum:]]|(http|https)\\S+\\s*|(#|@)\\S+\\s*|\\n|\\"'
#type_visited = "Visited"
#type_searched = "Searched"
#search_data[search_data$type == type_visited, ]$search
search <- search_data$search %>%
str_replace_all(pattern = replace_reg, replacement = " ") %>%
remove_words <- c( "chrome", "searched", "chicago", "jlroo",
"google", "loyola", "university", "luc",
"business", "analysis", "documentation")
my_stop_words <- bind_rows(data_frame(word = remove_words, lexicon = c("SMART")), stop_words)
min_freq = 100
fig_scale = c(4 , 0.5)
max_words = 100
search %>%
anti_join(my_stop_words) %>%
count(word) %>%
with(wordcloud(word, n,
scale = fig_scale,
min.freq = min_freq,
max.words = max_words))
---
title: "Analyzing Google Search Data"
author: "Jose Luis Rodriguez"
output:
html_notebook: default
html_document: default
date: "August 8, 2018"
subtitle: "CME Business Analytics Lab"
---
@RodriguezGoldstein
RodriguezGoldstein / food_inspection.csv
Created May 24, 2019 18:49
Geocoding: Chicago food inspections sample data clean.
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Inspection_ID,DBA_Name,Facility_Type,Risk,Address,City,State,Zip,Results,Violations,latitude,longitude
2288987,CABANA BAR,Liquor,low,5342 N CUMBERLAND AVE,CHICAGO,IL,60656,Not_Ready,"3. MANAGEMENT, FOOD EMPLOYEE AND CONDITIONAL EMPLOYEE; KNOWLEDGE, RESPONSIBILITIES AND REPORTING - Comments: OBSERVED NO EMPLOYEE HEALTH POLICY ON SITE.INSTRUCTED MANAGEMENT TO CREATE AN EMPLOYEE HEALTH POLICY. PRIORITY FOUNDATION VIOLATION 7-38-010 NO CITATION ISSUED | 5. PROCEDURES FOR RESPONDING TO VOMITING AND DIARRHEAL EVENTS - Comments: OBSERVED NO EMPLOYEE HEALTH POLICY ON SITE.INSTRUCTED MANAGEMENT TO CREATE AN EMPLOYEE HEALTH POLICY. PRIORITY FOUNDATION VIOLATION 7-38-010 NO CITATION ISSUED | 10. ADEQUATE HANDWASHING SINKS PROPERLY SUPPLIED AND ACCESSIBLE - Comments: OBSERVED NO SOAP AT ANY OF THE HAND WASH SINKS OR BASINS.INSTRUCTED MANAGEMENT TO SUPPLY SOAP TO THESE SINKS. PRIORITY FOUNDATION VIOLATION 7-38-030(c) | 10. ADEQUATE HANDWASHING SINKS PROPERLY SUPPLIED AND ACCESSIBLE - Comments: Comments: OBSERVED NO HAN
@RodriguezGoldstein
RodriguezGoldstein / food_inspection_sample.csv
Created May 24, 2019 18:50
Geocoding: Chicago food inspections sample data
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Inspection ID,DBA Name,Facility Type,Risk,Address,City,State,Zip,Results,Violations
2288987,CABANA BAR,Liquor,Risk 3 (Low),5342 N CUMBERLAND AVE,CHICAGO,IL,60656,Not Ready,"3. MANAGEMENT, FOOD EMPLOYEE AND CONDITIONAL EMPLOYEE; KNOWLEDGE, RESPONSIBILITIES AND REPORTING - Comments: OBSERVED NO EMPLOYEE HEALTH POLICY ON SITE.INSTRUCTED MANAGEMENT TO CREATE AN EMPLOYEE HEALTH POLICY. PRIORITY FOUNDATION VIOLATION 7-38-010 NO CITATION ISSUED | 5. PROCEDURES FOR RESPONDING TO VOMITING AND DIARRHEAL EVENTS - Comments: OBSERVED NO EMPLOYEE HEALTH POLICY ON SITE.INSTRUCTED MANAGEMENT TO CREATE AN EMPLOYEE HEALTH POLICY. PRIORITY FOUNDATION VIOLATION 7-38-010 NO CITATION ISSUED | 10. ADEQUATE HANDWASHING SINKS PROPERLY SUPPLIED AND ACCESSIBLE - Comments: OBSERVED NO SOAP AT ANY OF THE HAND WASH SINKS OR BASINS.INSTRUCTED MANAGEMENT TO SUPPLY SOAP TO THESE SINKS. PRIORITY FOUNDATION VIOLATION 7-38-030(c) | 10. ADEQUATE HANDWASHING SINKS PROPERLY SUPPLIED AND ACCESSIBLE - Comments: Comments: OBSERVED NO HAND DRYING D
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Pi(π) - MonteCarlo</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style id="jsbin-css">
body { font: 11px sans-serif; }
@RodriguezGoldstein
RodriguezGoldstein / option-pricing.ipynb
Last active August 8, 2025 15:40
option-pricing.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RodriguezGoldstein
RodriguezGoldstein / pi-estimation.ipynb
Last active August 8, 2025 15:39
pi-estimation.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RodriguezGoldstein
RodriguezGoldstein / chat.sql
Created February 26, 2025 14:51 — forked from jkeen/chat.sql
iMessage chat.db deciphering
SELECT
m.rowid as message_id,
(SELECT chat_id FROM chat_message_join WHERE chat_message_join.message_id = m.rowid) as message_group,
CASE p.participant_count
WHEN 0 THEN "???"
WHEN 1 THEN "Individual"
ELSE "Group"
END AS chat_type,
DATETIME(date +978307200, 'unixepoch', 'localtime') AS date,
CASE is_from_me