Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
E
Efecto Airbnb Valencia
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Efecto Airbnb
Efecto Airbnb Valencia
Commits
3891de6d
Commit
3891de6d
authored
Mar 03, 2019
by
numeroteca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add R script for viviendas turísticas analisis
parent
129dfe18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
analysis/vut-analysis.R
analysis/vut-analysis.R
+57
-0
No files found.
analysis/vut-analysis.R
0 → 100644
View file @
3891de6d
# script para analizar las viviendas turísticas de la comunidad Valenciana
library
(
tidyverse
)
# load data
vut_valencia
<-
read_csv
(
"data/original/190302_viviendas-turisticas-comunidad-valenciana.csv"
)
vut
<-
read_csv
(
"data/original/190302_viviendas-turisticas-comunidad-valenciana_valencia.csv"
)
# Analisis comunidad valenciana -------------
vut.municipio
<-
group_by
(
vut_valencia
,
Municipio
)
%>%
summarise
(
n
=
n
()
)
%>%
arrange
(
desc
(
n
))
vut.municipio
%>%
head
(
25
)
%>%
ggplot
(
aes
(
x
=
reorder
(
Municipio
,
n
),
y
=
n
))
+
geom_col
()
+
coord_flip
()
+
theme_minimal
(
base_family
=
"Roboto Condensed"
,
base_size
=
14
)
+
theme
(
panel.grid.minor.y
=
element_blank
(),
panel.grid.major.y
=
element_blank
(),
legend.position
=
"bottom"
)
+
labs
(
title
=
"Número de viviendas turísticas por municipo: top 25"
,
subtitle
=
"Valencia. Marzo 2019."
,
y
=
"nº anuncios"
,
x
=
"tlf"
,
caption
=
"Datos: Comunidad Valenciana. Gráfico: lab.montera34.com/airbnb"
)
# analisis Valencia -----------------
table
(
vut
$
Signatura
)
names
(
vut
)
<-
c
(
"signatura"
,
"municipio"
,
"provincia"
,
"addres"
,
"tlf"
)
ggplot
(
data
=
vut
)
+
geom_bar
(
stat
=
'identity'
,
aes
(
x
=
signatura
,
y
=
tlf
))
ntlf
<-
group_by
(
vut
,
tlf
)
%>%
summarise
(
n
=
n
()
)
%>%
arrange
(
desc
(
n
))
ntlf
[
!
is.na
(
ntlf
$
tlf
),]
%>%
head
(
25
)
%>%
ggplot
(
aes
(
x
=
reorder
(
tlf
,
n
),
y
=
n
))
+
geom_col
()
+
coord_flip
()
+
theme_minimal
(
base_family
=
"Roboto Condensed"
,
base_size
=
14
)
+
theme
(
panel.grid.minor.y
=
element_blank
(),
panel.grid.major.y
=
element_blank
(),
legend.position
=
"bottom"
)
+
labs
(
title
=
"Número de viviendas turísticas por teléfono: top 25"
,
subtitle
=
"Valencia. Marzo 2019."
,
y
=
"nº anuncios"
,
x
=
"tlf"
,
caption
=
"Datos: Comunidad Valenciana. Gráfico: lab.montera34.com/airbnb"
)
select
(
vut
,
tlf
==
963356793
)
table
(
local_activo
$
room_type
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment