This is the slides I made for NYC Open Data meetup.event detail: http://www.meetup.com/NYC-Open-Data/events/137235202/
NYC Open Data meetup group offers free woekshop twice per week in NYC. Everyone is welcome to come and learn data science and open data topics. Sin up at http://www.meetup.com/NYC-Open-Data/
Sales & Marketing Alignment: How to Synergize for Success
Ggplot2 1outof3
1. Learnggplot2
AsKungfu Skill
A K
f Skills
Givenby
KaiXiao(DataSciencetist)
VivianZhang(Co-founder&CTO)
Vi i Zh
(C f
d & CTO)
Contact:vivian.zhang@supstat.com
Contact: vivian zhang@supstat com
2. • I: Point
• II: Bar
• III:Histogram
g
• IV:Line
• V: Tile
• VI:Map
3. Introduction
• ggplot2 is a plotting system for R
• based on the《The Grammar of
Graphics》
• which tries to take the good parts
of base and lattice graphics and
none of the bad parts
none of the bad parts
• It takes care of many of the fiddly
details that make plotting a hassle
details that make plotting a hassle
• It becomes easy to produce
complex multi‐layered graphics
p
y
g p
4. Whyweloveggplot2?
Why we love ggplot2?
•
controltheplotasabstractlayersandmakecreativitybecomereality;
•
getusedtostructuralthinking;
d
l hi ki
•
getbeautifulgraphicswhileavoidingcomplicateddetails
1973murdercasesinUSA
10. Coordinate
Cood will affect how we observe graphical
willaffecthowweobservegraphical
elements.Transformationofcoordinatesisuseful.
Stat
Coord
15. Sampledata mpg
Sample data--mpg
• Fuel economy data from 1999 and 2008 for 38 popular
y
p p
models of car
•
•
•
•
•
•
•
Details
D il
Displ : engine displacement, in litres
Cyl: number of cylinders
Cyl:
number of cylinders
Trans: type of transmission
Drv: front‐wheel, rear wheel drive, 4wd
,
,
Cty: city miles per gallon
Hwy: highway miles per gallon