This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:14-alpine | |
ENV VERSON=2.0.0 | |
ENV COMPONENT=imi-enrichment-address | |
WORKDIR /usr/local/${COMPONENT} | |
RUN apk --no-cache --virtual .build-deps add curl \ | |
&& curl -o imi-enrichment-address-${VERSON}.tgz \ | |
https://info.gbiz.go.jp/tools/imi_tools/resource/${COMPONENT}/${COMPONENT}-${VERSON}.tgz \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Choropleth Demo" | |
output: | |
flexdashboard::flex_dashboard: | |
orientation: rows | |
runtime: shiny | |
--- | |
```{r global, include=FALSE} | |
# load data in 'global' chunk so it can be shared by all users of the dashboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RPostgreSQL) | |
library(leaflet) | |
# データベースに接続 | |
con <- dbConnect(PostgreSQL(), host="host_name", port=port_number, dbname="database_name", user="user_name", password="password") | |
# クエリ文字列を定義 | |
query <- paste("SELECT pref, city, town, block,", | |
"ST_Y(ST_Transform(the_geom, 4326)) AS lat,", | |
"ST_X(ST_Transform(the_geom, 4326)) AS lon", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 位置参照情報ダウンロードサービス(http://nlftp.mlit.go.jp/isj/)から | |
-- ダウンロードしたをデータを格納するテーブル | |
CREATE TABLE loc_ref_info( | |
pref varchar(100) -- 都道府県名 | |
, city varchar(100) -- 市区町村名 | |
, town varchar(100) -- 大字・町丁目名 | |
, block varchar(100) -- 街区符号・地番 | |
, coord_no integer -- 座標系番号 | |
, x numeric -- X座標 | |
, y numeric -- Y座標 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM kashitan/tensorflow:latest | |
MAINTAINER Takashi Kitano <@kashitan> | |
# Install R | |
RUN yum install -y R wget initscripts && \ | |
yum clean all | |
# Install RStudio-Server | |
RUN wget https://download2.rstudio.org/rstudio-server-rhel-0.99.903-x86_64.rpm && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:7.5-cudnn5-devel-centos7 | |
MAINTAINER Takashi Kitano <@kashitan> | |
RUN yum install -y epel-release && \ | |
yum install -y gcc \ | |
gcc-c++ \ | |
initscripts \ | |
libcurl-devel \ | |
make \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
ExecStart= | |
ExecStart=/usr/bin/dockerd --graph="/mnt/docker-data" --storage-driver=overlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(jsonlite) | |
l <- read.csv("shapes.csv", header = TRUE, colClasses = c("character", "character", "character")) | |
fix_str <- '{"index":{"_index":"towns", "_type":"town"}}' | |
for(i in 1:nrow(l)) { | |
s <- fromJSON(paste0("geojson/", l$city_cd[i], ".json")) | |
f <- s$features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
city_cd | dir | shape | |
---|---|---|---|
01101 | A002005212010DDSWC01101 | h22ka01101 | |
01102 | A002005212010DDSWC01102 | h22ka01102 | |
01103 | A002005212010DDSWC01103 | h22ka01103 | |
01104 | A002005212010DDSWC01104 | h22ka01104 | |
01105 | A002005212010DDSWC01105 | h22ka01105 | |
01106 | A002005212010DDSWC01106 | h22ka01106 | |
01107 | A002005212010DDSWC01107 | h22ka01107 | |
01108 | A002005212010DDSWC01108 | h22ka01108 | |
01109 | A002005212010DDSWC01109 | h22ka01109 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgdal) | |
library(sp) | |
library(maptools) | |
l <- read.csv("shapes.csv", header = TRUE, colClasses = c("character", "character", "character")) | |
P4S.latlon <- CRS("+proj=longlat +datum=WGS84") | |
for(i in 1:nrow(l)) { | |
shp <- readShapePoly(paste0("shapes/", l$dir[i], "/", l$shape[i]) , |
NewerOlder