Skip to content

Instantly share code, notes, and snippets.

View arthurwuhoo's full-sized avatar

Arthur Wu arthurwuhoo

  • Dataland
View GitHub Profile
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/assets/css/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_nvd3_tests/libraries/widgets/nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='http://nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script>
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/assets/css/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_nvd3_tests/libraries/widgets/nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='http://nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script>
@arthurwuhoo
arthurwuhoo / index.html
Created July 30, 2014 02:30
Coursework
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/assets/css/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_nvd3_tests/libraries/widgets/nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='http://nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script>
@arthurwuhoo
arthurwuhoo / index.html
Created July 30, 2014 02:31
Coursework
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/assets/css/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_nvd3_tests/libraries/widgets/nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='http://nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script>
# The Uniform Distribution --------------------------------------------------------------------------------------------
# Have a look at ?runif.
dunif(0.5, 0, 2) # PDF
punif(0.5, 0, 2) # CDF
qunif(seq(0, 1, 0.25), 0, 2) # Quantiles
runif(5, 0, 2) # Samples
# =====================================================================================================================
# HYPOTHESIS TESTING EXERCISES
# =====================================================================================================================
# Hypothesis Testing with Scraped Movie Data
# Credits:
#
# original script - Michael Wattendorf
# exercises - Arthur Wu
# OCD edits - Andrew Collier
[
{
"PERMIT NUMBER":"AK-S-15000",
"OWNER NAME":"GLACIER CREEK DISTILLERY LLC",
"OPERATING NAME":"",
"STREET":"1540 N SHORELINE DR",
"CITY":"WASILLA",
"STATE":"AK",
"ZIP":99654,
"ZIP4":0,
#EXERCISE 1
#Identify the various data types in the following JSON document:
#----------------------------------------------------------------
# Before you can read in the JSON, you have to fix it. This was a little unfair
# to presume, so sorry about that. However, debugging is such a central component
# to working in R across lots of different datasets.
# There were a few errors
######################################
# DAY 8: SCRAPING VIA API POST-LECTURE EXERCISES
######################################
#EXERCISE 1
#Identify the various data types in the following JSON document:
#----------------------------------------------------------------
# Before you can read in the JSON, you have to fix it. This was a little unfair
# to presume, so sorry about that. However, debugging is such a central component
########################################################################
## DAY 6: SCRAPING DATA FROM A WEBPAGE - POST-CLASS EXERCISES
########################################################################
#------------------------------------------------
# EXERCISE 1
#------------------------------------------------