博文

目前显示的是 十二月, 2018的博文

R 地图

library(readxl) library(tidyverse) library(REmap) data = data.frame(country = mapNames("world"),                   value = 5*sample(178)+200) out = remapC(data,maptype = "gansu",color = 'skyblue') plot(out) #数据 #city <- mapNames("gansu") #value <- runif(21,min = 1,max = 100) #构建数据框 #data_DF <- data.frame(city,value) data_df <- read.csv('D:\\地图\\Report.csv') #绘制填充地图 result <- remapC(data_df,                  title ="甘肃省百日咳",                  maptype = "gansu",                  color = "red",                  maxdata = 100,                  mindata = 1) library(leafletCN) shi <- regionNames("甘肃省") xian <- shi %>% map(regionNames) %>% unlist() dat=data.frame(name = xian,value = runif(87)) regionNames("兰州市") demomap("兰州市") #dat = data.frame(name = regionNames("甘肃省"),value = runif(14)) geojsonMap(data_df,"甘肃&

linux下切换python2和python3

sudo rm /usr/bin/python sudo ln -s /usr/bin/python3.6 /usr/bin/python sudo rm /usr/bin/pip sudo ln -s /usr/bin/pip3 /usr/bin/pip

oracle 连接

一、linux Sys.setenv(NLS_LANG="AMERICAN_AMERICA.ZHS16GBK") library(ROracle) drv <- dbDriver("Oracle") connect.string <- paste(   "(DESCRIPTION=",   "(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.30.12)(PORT=1521))",   "(CONNECT_DATA=(SERVICE_NAME=JZDB1)))", sep = "") con <- dbConnect(drv, username = "<>", password = "<>",                  dbname = connect.string) jzjl <- dbGetQuery(con, "select * from inoc_jzjl where rownum<1000") et <- dbGetQuery(con,"select * from grda_et where rownum<1000") dbDisconnect(con) class(et) #GBK转UTF-8 library(tidyverse) library(magrittr) et %<>%   select_if(is.character) %>%   map_df(~ iconv(.x,from="GBK",to="UTF-8")) jzjl %<>%   select_if(is.character) %>%   map_df(~ iconv(.x,from = "GBK",to="UTF-8")) 二、windows Sys.setenv(JAVA_HOME='F:\\jdk-11.0.