Skip to content

Instantly share code, notes, and snippets.

library("RSelenium")
library("rvest")
library("tidyverse")
library("stringr")
browser = remoteDriver(remoteServerAddr = "localhost", port = 4444, browserName = "chrome")
browser$open()
for(page in 1:58){
url <- paste0("http://gis.biodic.go.jp/webgis/sc-017.html?1st=",str_pad(page, 2, pad = "0"))
SET OSGEO4W_ROOT=C:\Program Files\QGIS 3.8
SET EPSG=6672
SET GDAL_DATA=%OSGEO4W_ROOT%\share\gdal
cd %~dp0
for %%i in (%*) do (
del "%%~ni"_out.csv
del "%%~ni"_out.geojson
"%OSGEO4W_ROOT%\bin\ogr2ogr.exe" -f CSV "%%~ni"_out.csv "%%i" -s_srs epsg:4326 -t_srs epsg:%EPSG% -lco GEOMETRY=AS_XYZ -oo X_POSSIBLE_NAMES=lon -oo Y_POSSIBLE_NAMES=lat -oo Z_POSSIBLE_NAMES=alt
//////////////////////////////////////////
// 2019.10.11 Ver1.02
//
// pos2LatLonAlt.js
//
// Usage:
// convert pos file to Lat Lon Alt csv file.
// output value is median of fix value.
// drag and drop pos file to pos2LatLonAlt.js, the csv file will be output to the same folder of pos file.
/////////////////////////////////////////
library(rvest)
library(dplyr)
library(tidyr)
library(purrr)
library(ggplot2)
require(ggthemes)
getRain<-function(year,month){
source_url <- paste0("http://www.data.jma.go.jp/obd/stats/etrn/view/daily_s1.php?prec_no=48&block_no=47620&year=",year,"&month=",month,"&day=&view=p1")
weather_html <- read_html(source_url, encoding = "UTF-8")
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis maxScale="0" hasScaleBasedVisibilityFlag="0" minScale="1e+8" version="3.2.2-Bonn">
<pipe>
<rasterrenderer band="1" classificationMin="-4000" classificationMax="8000" opacity="1" type="singlebandpseudocolor" alphaBand="-1">
<rasterTransparency/>
<minMaxOrigin>
<limits>None</limits>
<extent>WholeRaster</extent>
<statAccuracy>Estimated</statAccuracy>
<cumulativeCutLower>0.02</cumulativeCutLower>
<?xml version = '1.0' encoding = 'UTF-8'?>
<?xml-stylesheet type='text/xsl' href='plugins.xsl' ?>
<plugins>
<pyqgis_plugin name='freehandEditing Plugin' version='0.1.0'>
<description><![CDATA[This plugin allows you to freehand editing.]]></description>
<version>0.1.0</version>
<qgis_minimum_version>2.14</qgis_minimum_version>
<qgis_maximum_version>2.99</qgis_maximum_version>
<homepage>https://github.com/tmizu23/freehandEditing</homepage>
<file_name>freehandEditing.zip</file_name>
name lat lon area
西クマネシリダケ・ピリベツ岳 43.524422 143.229961 北海道上士幌町
七時雨山 40.070009 141.107197 岩手県八幡平市
安達太良山 37.621130 140.287864 福島県郡山市
二岐山 37.247941 139.965477 福島県天栄村
乳房山 26.659560 142.161412 東京都小笠原村母島
乳頭山 27.096348 142.210046 東京都小笠原村父島
笠山 36.018509 139.189873 埼玉県小川町
要害山 35.703142 138.599333 山梨県甲府市
574ピーク 34.583811 132.211576 広島県安芸太田町
@tmizu23
tmizu23 / veg.json
Last active December 5, 2017 04:01
{
"tilejson": "2.2.0",
"tiles": ["https://map.ecoris.info/mvt-tiles/veg/{z}/{x}/{y}.pbf"],
"name": "veg mvt",
"attribution": "Biodiversity Center of Japan",
"maxzoom": 14,
"minzoom": 0,
"bounds": [140.746596,37.836344,140.871589,37.919672],
"center": [140.767822,37.848832,14],
"vector_layers": [{
@tmizu23
tmizu23 / test.json
Last active December 1, 2017 02:03
{
"tiles": ["https://hfu.github.io/chome-vt/{z}/{x}/{y}.mvt"],
"name": "test Map Tiles",
"format": "mvt",
"basename": ".",
"id": "testtiles",
"attribution": "test attribution",
"center": [135, 35, 12],
"description": "test",
{
"version": 8,
"name": "GSI ORT Raster Tiles",
"glyphs": "https://smellman.github.io/creating_tiles_with_global_map_support_files/2015/mapbox_vector_tile_demo/demosites/fonts/{fontstack}/{range}.pbf",
"sprite": "https://smellman.github.io/creating_tiles_with_global_map_support_files/2015/mapbox_vector_tile_demo/demosites/maki-sprites/sprite",
"sources": {
"gsi-ort": {
"type": "raster",
"tiles": [
"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"