Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BelgiumMaps.StatBel
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
BelgiumMaps.StatBel
Commits
4f8c3f44
Commit
4f8c3f44
authored
Jun 14, 2016
by
Jan Wijffels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update visualisation
parent
075ff4f7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
README.md
+1
-0
inst/dev/09_example_visualisation.R
+3
-4
No files found.
README.md
View file @
4f8c3f44
...
...
@@ -17,6 +17,7 @@ This data is available in several objects:
## Installation
```
install.packages(c('sp', 'knitr', 'markdown'))
devtools::install_git("http://bnosac.all2all.org:10080/gitlab/open-source/BelgiumMaps.StatBel.git", build_vignettes = TRUE)
## See the vignette
vignette("BelgiumMaps_AdministrativeAreas_StatBel.Rmd", package = "BelgiumMaps.StatBel")
...
...
inst/dev/09_example_visualisation.R
View file @
4f8c3f44
...
...
@@ -21,11 +21,9 @@ taxes <- taxes[, c("CD_YEAR", "CD_REFNIS_SECTOR",
data
(
BE_ADMIN_SECTORS
,
package
=
"BelgiumMaps.StatBel"
)
data
(
BE_ADMIN_DISTRICT
,
package
=
"BelgiumMaps.StatBel"
)
data
(
BE_ADMIN_MUNTY
,
package
=
"BelgiumMaps.StatBel"
)
mymap
<-
merge
(
BE_ADMIN_SECTORS
,
taxes
,
by
=
"CD_REFNIS_SECTOR"
,
all.x
=
TRUE
,
all.y
=
FALSE
)
## Map the data
mymap
<-
subset
(
mymap
,
TX_RGN_DESCR_NL
%in%
"Brussels Hoofdstedelijk Gewest"
)
## Visualise the data
pal
<-
colorBin
(
palette
=
rev
(
heat.colors
(
11
)),
domain
=
mymap
$
MS_AVG_TOT_NET_TAXABLE_INC
,
bins
=
c
(
0
,
round
(
quantile
(
mymap
$
MS_AVG_TOT_NET_TAXABLE_INC
,
na.rm
=
TRUE
,
probs
=
seq
(
0.1
,
0.9
,
by
=
0.1
)),
0
),
+
Inf
),
na.color
=
"#cecece"
)
...
...
@@ -41,7 +39,8 @@ m <- leaflet(mymap) %>%
m
<-
addPolylines
(
m
,
data
=
BE_ADMIN_DISTRICT
,
weight
=
1.5
,
color
=
"black"
)
m
## Save as HTML
library
(
htmlwidgets
)
m
$
sizingPolicy
$
defaultHeight
<-
"100%"
m
$
sizingPolicy
$
defaultWidth
<-
"100%"
saveWidget
(
m
,
file
=
"be_net_taxable_income_sector.html"
)
saveWidget
(
m
,
file
=
"be_net_taxable_income_sector.html"
,
selfcontained
=
FALSE
)
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