0% found this document useful (0 votes)
14 views8 pages

Visualizacion

Uploaded by

barco8336
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views8 pages

Visualizacion

Uploaded by

barco8336
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Grafica

Daniel Barco

7/2/2022

library(readxl)

dfCliente <- read_excel("Datos/Transacciones.xlsx" , sheet = "Clientes")

## New names:
## * ‘‘ -> ...15
## * ‘‘ -> ...16
## * ‘‘ -> ...17
## * ‘‘ -> ...18
## * ‘‘ -> ...19

dfCliente

## # A tibble: 1,000 x 19
## Nacimiento Apellido Nombre Profesion IndustriaCategor~
## <dttm> <chr> <chr> <chr> <chr>
## 1 1957-07-12 00:00:00 Brister Chickie General Manager Manufacturing
## 2 1970-03-22 00:00:00 Genery Morly Structural Engineer Property
## 3 1974-08-28 00:00:00 Forrester Ardelis Senior Cost Account~ Financial Servic~
## 4 1979-01-28 00:00:00 Stutt Lucine Account Representat~ Manufacturing
## 5 1965-09-21 00:00:00 Hadlee Melinda Financial Analyst Financial Servic~
## 6 1951-04-29 00:00:00 Brandli Druci Assistant Media Pla~ Entertainment
## 7 1976-10-06 00:00:00 Hallt Rutledge Compensation Analyst Financial Servic~
## 8 1972-12-27 00:00:00 Vian Nancie Human Resources Ass~ Retail
## 9 1972-04-28 00:00:00 Karlowicz Duff Speech Pathologist Manufacturing
## 10 1985-08-02 00:00:00 Docket Barthel Accounting Assistan~ IT
## # ... with 990 more rows, and 14 more variables: SegmentoIngreso <chr>,
## # Genero <chr>, TieneVehiculo <chr>, Direccion <chr>, codigoPostal <chr>,
## # Estado <chr>, Pais <chr>, Rango <dbl>, Valor <dbl>, ...15 <lgl>,
## # ...16 <lgl>, ...17 <chr>, ...18 <chr>, ...19 <chr>

Genero

#Cualitativas
ggplot( data = dfCliente ) +
geom_bar( mapping = aes(x = Genero))

1
500

400

300
count

200

100

Female Male U
Genero

ggplot(dfCliente)

2
dfCliente%>%
count(Genero)

## # A tibble: 3 x 2
## Genero n
## <chr> <int>
## 1 Female 513
## 2 Male 470
## 3 U 17

dfCliente%>%
group_by(Genero)%>%
summarise(n())

## # A tibble: 3 x 2
## Genero ‘n()‘
## <chr> <int>
## 1 Female 513
## 2 Male 470
## 3 U 17

Estado

3
ggplot( data = dfCliente ) +
geom_bar( mapping = aes(x = Estado))

500

400

300
count

200

100

NSW QLD VIC


Estado

Vehiculo

ggplot( data = dfCliente ) +


geom_bar( mapping = aes(x = TieneVehiculo))

4
500

400

300
count

200

100

No Yes
TieneVehiculo

Profesion

Tiene demasiadas cateogrias, hacer una analisis con mayor profundida

ggplot( data = dfCliente ) +


geom_bar( mapping = aes(x = Profesion))

5
100

75
count

50

25

Account
Account
Account
Account
Account
Accounting
Analog
Accounting
Accounting
Accounting
Administrative
Administrative
Accountant
Representative
Accountant
Representative
Accountant
Representative
Accountant
Representative
Coordinator
Business
Administrative
Assistant
Executive
Analyst
Assistant
Automation
Circuit
Budget/Accounting
Automation
Budget/Accounting
Automation
Assistant
Budget/Accounting
Associate
Automation
Budget/Accounting
Actuary
Community
Assistant
Assistant
Assistant
Assistant
Biostatistician
Systems
Programmer
Computer
Chief
Computer
IComputer
II
Design
III
Media
Computer
Chemical
IVAssistant
Assistant
Compensation
Manager
Clinical
Professor
IIIProfessor
III
Civil
Officer
Database
IV
Database
Specialist
Database
Specialist
Design
Specialist
Database
Specialist
Desktop
IPlanner
IIIII
Cost
manager
IV
Data
Development
Outreach
Engineer
Systems
Systems
Systems
Engineer
Systems
Specialist
Dental
IIIDesign
Analyst
IV
Accountant
Engineer
Analyst
Analyst
Analyst
Coordiator
Administrator
Director
Environmental
Electrical
Administrator
ISupport
Developer
Administrator
II
Developer
III
Developer
Administrator
IV
Developer
Analyst
Environmental
Hygienist
Executive
Specialist
Analyst
Engineer
Analyst
Analyst
Engineer
Analyst
Engineer
Engineer
Financial
IEngineer
Editor
II
Financial
Geological
III
IV
GIS
General
Analyst
Food
Human
of
Human
Technician
Human
Human
Engineer
Graphic
Sales
Information
III
Human
Geologist
Technical
III
Help
Geologist
IV
Help
IHealth
IIHealth
III
Health
IV
Health
Secretary
IChemist
IIIII
IIV
IIMechanical
Specialist
III
Advisor
IV
Manager
Analyst
Resources
Resources
Resources
Desk
Resources
Desk
Engineer
Tech
Designer
Internal
Junior
Marketing
Resources
Coach
Coach
Marketing
Coach
Legal
Coach
Nuclear
Architect
Payment
III
IIV
Media
Media
Media
Technician
Systems
Occupational
Operator
Media
Librarian
Nurse
Executive
Physical
Assistant
IOffice
II
Systems
Office
III
Auditor
IV
Assistant
Assistant
Assistant
Assistant
Manager
Power
Manager
Manager
Assistant
Manager
Programmer
Manager
Programmer
Nurse
Programmer
Manager
Adjustment
Programmer
Product
Practicioner
Manager
Operator
Paralegal
Pharmacist
Assistant
Quality
Assistant
Therapy
Professor
Engineer
Programmer
Programmer
Therapist
Programmer
Project
Programmer
IIIIII
Recruiting
Quality
IV
IResearch
IIResearch
III
Research
IV
Engineer
Research
Registered
Control
Research
Recruiter
Coordinator
Safety
IAnalyst
Safety
IIIV
Senior
Analyst
Assistant
Research
Analyst
Sales
Analyst
Manager
Senior
Senior
Engineer
Sales
Senior
Senior
Manager
Assistant
Specialist
Software
Assistant
Assistant
ISoftware
II
Software
Assistant
Senior
Technician
III
Technician
Software
Representative
IV
Software
Cost
Nurse
III
Associate
III
Social
Financial
IV
Associate
Quality
Sales
Nurse
Speech
Developer
Structural
Staff
Staff
Accountant
Staff
Staff
Editor
Worker
Consultant
ITest
Systems
IITest
Systems
III
Test
Systems
Engineer
IV
Engineer
Test
Systems
Staff
Associate
Engineer
Engineer
Structural
Accountant
Accountant
IStatistician
Accountant
II
Statistician
IV
Analyst
Statistician
Accountant
Statistician
Pathologist
VP
Engineer
Engineer
Engineer
Engineer
Scientist
Tax
Analysis
Technical
Product
VP
Administrator
Administrator
VP
Administrator
Administrator
III
Accountant
Teacher
III
Web
Web
Engineer
Quality
Accounting
Web
Web
Marketing
VP
IIIIIII
IIIV
III
IV
Engineer
Designer
Management
Designer
Sales
Writer
Developer
Developer
Control
NAIIIIII
IVIIIIVIIIIV
Profesion

ggplot( data = dfCliente ) +


geom_histogram(mapping = aes( x = Valor), binwidth = 0.001)

6
10
count

0.5 1.0 1.5


Valor

ggplot( data = dfCliente ) +


geom_histogram(mapping = aes( x = Valor))

## ‘stat_bin()‘ using ‘bins = 30‘. Pick better value with ‘binwidth‘.

7
60

40
count

20

0.5 1.0 1.5


Valor

dfCliente%>%
count(cut_width(Valor, 0.2))

## # A tibble: 8 x 2
## ‘cut_width(Valor, 0.2)‘ n
## <fct> <int>
## 1 [0.3,0.5] 97
## 2 (0.5,0.7] 222
## 3 (0.7,0.9] 238
## 4 (0.9,1.1] 211
## 5 (1.1,1.3] 137
## 6 (1.3,1.5] 73
## 7 (1.5,1.7] 17
## 8 (1.7,1.9] 5

You might also like