網(wǎng)上有很多關(guān)于pos機(jī)刷卡特寫(xiě),上帝視角—給世界一個(gè)特寫(xiě)~的知識(shí),也有很多人為大家解答關(guān)于pos機(jī)刷卡特寫(xiě)的問(wèn)題,今天pos機(jī)之家(www.joybike.net)為大家整理了關(guān)于這方面的知識(shí),讓我們一起來(lái)看下吧!
本文目錄一覽:
2、浦發(fā)消費(fèi)分期付可以用pos機(jī)刷卡嗎
pos機(jī)刷卡特寫(xiě)
關(guān)注天善智能,走好數(shù)據(jù)之路↑↑↑歡迎關(guān)注天善智能,我們是專注于商業(yè)智能BI,大數(shù)據(jù),數(shù)據(jù)分析領(lǐng)域的垂直社區(qū)。
最近在研究使用R包制作動(dòng)畫(huà)圖表,也就是類似GIF動(dòng)圖,感覺(jué)很有趣,也是動(dòng)態(tài)圖表呈現(xiàn)的一個(gè)非常獨(dú)特的領(lǐng)域,剛剛研究出了些成果,今天這篇分享使用GIF動(dòng)畫(huà)+球型投影來(lái)制作呈現(xiàn)地球轉(zhuǎn)動(dòng)效果的動(dòng)態(tài)GIF圖表。
過(guò)程要使用謝益輝大神的動(dòng)畫(huà)包——animation,該包依賴可執(zhí)行程序——ImageMagic,所以導(dǎo)入animation包之前要提前下載并安裝該動(dòng)畫(huà)軟件。
library(ggplot2)
library(maps)
library(plyr)
library(grid)
library(showtext)
library(Cairo)
library(xlsx)
library(RColorBrewer)
library(dplyr)
library("animation")
本次使用maps中的世界地圖素材:
world_map <- map_data("world")
為了區(qū)分大洲,我將該地圖中的國(guó)家按照地理位置進(jìn)行了歸類(七大洲)
data<-read.csv("D:/R/mapdata/Word_State.csv",stringsAsFactors = FALSE,check.names = FALSE)
ggplot(data,aes(map_id=region))+
geom_map(aes(fill=Address),map=world_map,col="white")+
expand_limits(x=world_map$long,y=world_map$lat)+
scale_y_continuous(breaks=(-2:2)*30) +
scale_x_continuous(breaks=(-4:4)*45)+
coord_map("ortho", orientation = c(30,110,0))
篩選其中某一個(gè)州進(jìn)行特定角度呈現(xiàn):
data1<-data[data$Address=="North America",]
ggplot()+
geom_map(data=data,aes(map_id=region),map=world_map,col="white",fill="#A3A3A3")+
geom_map(data=data1,aes(map_id=region,fill=Address),map=world_map,col=NA)+
expand_limits(x=world_map$long,y=world_map$lat)+
scale_y_continuous(breaks=(-6:6)*15) +
scale_x_continuous(breaks=(-12:12)*15)+
coord_map("ortho", orientation = c(0,-95,0))+
guides(fill=FALSE) +
theme(
axis.ticks=element_blank(),
axis.text=element_blank(),
axis.title=element_blank(),
panel.background=element_rect(fill="white",colour=NA),
panel.grid.major = element_line(colour = "grey60",size=.25),
panel.grid.minor = element_line(colour = "grey60",size=.25)
)
world_map_data<-merge(world_map,data,all.x=TRUE)
midpos<-function(x) mean(range(x,na.rm=TRUE))
centres<-ddply(world_map_data,.(Address),colwise(midpos,.(long,lat)))
centres<-centres[centres$Address!="Antarctica",]
centres$angle<-0
centres$long[centres$Address=="Asia"]=100
centres$long[centres$Address=="North America"]=-100
centres$long[centres$Address=="Oceania"]=130
計(jì)算每個(gè)大洲的地區(qū)中心(個(gè)別中心偏離中心大陸太遠(yuǎn),需要手動(dòng)調(diào)整)
#-------------------
使用grid的版面控制系統(tǒng)進(jìn)行多圖排版:
setwd("E:/數(shù)據(jù)可視化/R/R語(yǔ)言學(xué)習(xí)筆記/可視化/Shiny/動(dòng)態(tài)圖表")
world_map_data<-arrange(world_map_data,group,order)
CairoPNG(file="wordmap.png",width="360px",height="auto" />
showtext.begin()
grid.newpage()
pushViewport(viewport(layout=grid.layout(2,3)))
vplayout<-function(x,y){viewport(layout.pos.row =x,layout.pos.col=y)}
for(i in 1:nrow(centres)){
mydata<-world_map_data[world_map_data$Address==centres$Address[i],]
p<-ggplot()+
geom_polygon(data=world_map_data,aes(x=long,y=lat,group=group),fill="grey95",colour="grey",size=.25)+
geom_map(data=mydata,aes(map_id=region),map=world_map_data,colour="white",fill="#F8766D",size=.25)+
coord_map("ortho",orientation=c(centres$lat[i],centres$long[i],0))+
scale_y_continuous(breaks=(-6:6)*15) +
scale_x_continuous(breaks=(-12:12)*15)+
labs(title=centres$Address[i])+
theme(
panel.background=element_rect(fill="white",colour=NA),
panel.grid.major = element_line(colour = "grey60",size=.25),
panel.grid.minor = element_line(colour = "grey60",size=.25),
text=element_text(size=20),
axis.text=element_blank(),
axis.title=element_blank(),
axis.ticks=element_blank(),
plot.title=element_text(size=20,family="myfont",hjust=.5),
plot.margin = unit(c(ifelse(i<=3,5,.5),1,ifelse(i>=3,5,.5),1),"lines")
)
print(p,vp=vplayout(ifelse(i<=3,1,2),ifelse(i<=3,i,i-3)))
}
grid.text(label="God\'s Perspective",x=.01,y=.98,gp=gpar(col="black",fontsize=35),draw=TRUE,just="left")
grid.text(label="Data Source:DataMofang",x=.02,y=.02,gp=gpar(col="black",fontsize=20),draw=TRUE,just="left")
showtext.end()
dev.off()
---------------------------------------------
使用animation包將361幀地圖合并為GIF動(dòng)畫(huà)
(友情提示:機(jī)器性能太弱請(qǐng)不要隨便玩火,容易爆內(nèi)存~?。。。?/p>
saveGIF({
ani.options(interval=.15,convert=shQuote("D:/Program
Files/ImageMagick-7.0.5-Q16/convert.exe"))
for(i in 0:360){
p<-ggplot()+
geom_polygon(data=world_map_data,aes(x=long,y=lat,group=group,fill=Address),colour="grey",size=.25)+
coord_map("ortho",orientation=c(0,i,0))+
scale_y_continuous(breaks=(-6:6)*15) +
scale_x_continuous(breaks=(-12:12)*15)+
scale_fill_brewer(name="million($)",palette="Set2")+
theme(
panel.background=element_rect(fill="white",colour=NA),
panel.grid.major = element_line(colour = "grey60",size=.25),
panel.grid.minor = element_line(colour = "grey60",size=.25),
axis.text=element_blank(),
axis.title=element_blank(),
axis.ticks=element_blank()
)
print(p)
}
},movie.name=\'Movingworld_map.gif\',ani.width="360px",height="auto" />
因?yàn)樵瓐D有13M,微信公眾平臺(tái)限制圖片大小為5m,所以大圖能就沒(méi)法奉上了,不過(guò)又做了一個(gè)壓縮版的小圖,效果如下:
draw = function(i){
ggplot()+
geom_polygon(data=world_map_data,aes(x=long,y=lat,group=group,fill=Address),colour="grey",size=.25)+
coord_map("ortho",orientation=c(0,i,0))+
scale_y_continuous(breaks=(-6:6)*15) +
scale_x_continuous(breaks=(-12:12)*15)+
scale_fill_brewer(name="million($)",palette="Set2")+
theme(
panel.background=element_rect(fill="white",colour=NA),
panel.grid.major = element_line(colour = "grey60",size=.25),
panel.grid.minor = element_line(colour = "grey60",size=.25),
axis.text=element_blank(),
axis.title=element_blank(),
axis.ticks=element_blank()
)
}
oopts=ani.options(ffmpeg = "D:/Program Files/ImageMagick-7.0.5-Q16/ffmpeg.exe")
saveVideo({
for(i in 1:36) print(draw(i))
ani.options(interval = 0.6,nmax=230)},
video.name ="world_map_move.gif",other.opts="-b 4000k")
該案例涉及到的技術(shù)面比較廣,需要使用循環(huán)、grid圖形版面控制、地圖投影、自編函數(shù)、顏色填充等,僅作為探索可視化道路上的一個(gè)小臺(tái)階,也許現(xiàn)在看起來(lái)有些高不可攀,但是當(dāng)你真正深入的了解R語(yǔ)法以及函數(shù)編程和ggplot2之后,就沒(méi)那么難理解了!
浦發(fā)消費(fèi)分期付可以用pos機(jī)刷卡嗎
浦fāxiāo費(fèi)分期付可以用pos機(jī)刷卡。浦發(fā)yín行的xiāo費(fèi)分期付是一種分期付款的消費(fèi)方式,可以通過(guò)銀行卡在商戶處進(jìn)xíng消費(fèi)如敬分期付款。使用POS機(jī)刷卡是一種常見(jiàn)的消費(fèi)支付方式,也是消費(fèi)分期付款的一種方式。因此,如果商戶支持POS機(jī)刷卡付款,消費(fèi)者可渣宴慎以通過(guò)刷百著括爾卡的方式使用浦發(fā)銀行的消費(fèi)祥銷謂變阻買吵分期付服務(wù)。
以上就是關(guān)于pos機(jī)刷卡特寫(xiě),上帝視角—給世界一個(gè)特寫(xiě)~的知識(shí),后面我們會(huì)繼續(xù)為大家整理關(guān)于pos機(jī)刷卡特寫(xiě)的知識(shí),希望能夠幫助到大家!









