Comments (5)
Now, my productivity is gone... I'll spend two months procrastinating on a logo 😆
from r5r.
This is a rough idea with a shortest path tree as the "root" of r5r
. I drawed this using vectr but ideally the logo should be a reprodducible example in R using OSM, sf, + other packages
from r5r.
Ok, this is my first result using the sample data we have in the package. Let me know what you thin.
from r5r.
Reproducible code for the hex sticker :
##### HEX sticker
### Libraries ------------------------
remotes::install_github("GuangchuangYu/hexSticker")
library(hexSticker) # https://github.com/GuangchuangYu/hexSticker
library(ggplot2)
library(sf)
library(r5r)
library(sysfonts)
# add special text font
sysfonts::font_add_google(name = "Roboto", family = "Roboto")
### setup ------------------------
# load origin/destination points
points <- read.csv(system.file("extdata/poa_hexgrid.csv", package = "r5r"))
points_sf <- sfheaders::sf_point(points, x='lon', y='lat', keep = T)
origin <- subset(points_sf, id == '89a90129977ffff')
destinations <- subset(points_sf, id %like% c('89a901299'))
# build transport network
data_path <- system.file("extdata", package = "r5r")
r5r_core <- setup_r5(data_path = data_path)
# routing
df <- detailed_itineraries(r5r_core,
origins = origin,
destinations = destinations,
mode = 'WALK',
departure_datetime = as.POSIXct("13-03-2019 14:00:00", format = "%d-%m-%Y %H:%M:%S"),
max_trip_duration = 30000L)
st_crs(destinations) <- st_crs(df)
### network plot ------------------------
# plot results
test <- ggplot() +
geom_sf(data = df, color='gray95', alpha=.2) +
# geom_sf(data=destinations, color='gray95', size=1) +
# geom_sf(data=destinations, color='navyblue', size=.6) +
scale_x_continuous(limits = c(-51.20560, -51.18052 )) +
scale_y_continuous(limits = c(-30.02239, -30.0002 )) +
theme_void() +
theme(panel.grid.major=element_line(colour="transparent"))
### save sticker ------------------------
# big
sticker(test,
# package name
package= expression(paste("R"^5,"R")), p_size=10, p_y = 1.5, p_color = "gray95", p_family="Roboto",
# ggplot image size and position
s_x=1, s_y=.85, s_width=1.4, s_height=1.4,
# blue hexagon
h_fill="#0d8bb1", h_color="white", h_size=1.3,
## blackhexagon
# h_fill="gray20", h_color="gray80", h_size=1.3,
# url
url = "github.com/ipeaGIT/r5r", u_color= "gray95", u_family = "Roboto", u_size = 1.8,
# save output name and resolution
filename="./man/figures/r5r_biag.png", dpi=300 #
)
from r5r.
I believe we can close this now. Thanks @mvpsaraiva !
from r5r.
Related Issues (20)
- How to filter large area (Germany) OSM PBF for transit and walk routing? HOT 15
- Support for Arrow HOT 2
- 2024-02-16 15:47:03,836 [ForkJoinPool.commonPool-worker-3] ERROR c.c.r.s.IntHashGrid - Visiting too many spatial index cells. HOT 13
- Transit layer loaded but numerous "ERROR c.c.r.s.StreetLayer" errors HOT 2
- setup_r5() function does not run. HOT 3
- Snapped distance not being calculated as crow flies "walking" distance HOT 4
- Java integration issue HOT 12
- trying to map accessibility and Detailed_itineraries function does not return travel mode "transit" HOT 11
- Accesibility Result same for every mode and hour of the day HOT 20
- Trouble Installing R5R in R: Fatal error HOT 2
- Error testing R5 v7.1 - does not have member field 'int maxDestinations' HOT 1
- Error in .jcall("RJavaTools", "Z", "hasField", .jcast(x, "java/lang/Object"), : java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "<parameter1>" is null HOT 39
- Update required JDK version in Getting Started vignette HOT 6
- r5r v2.0 on CRAN HOT 1
- Isochrones in low-road density contexts HOT 7
- network.dat not built after running setup_r5 HOT 8
- Recurring issue from issue #382: Isochrones in low-road density contexts HOT 1
- Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException HOT 4
- Code redundancy in R5TravelTimeComputer
- convinient function to check Java version HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r5r.