Coder Social home page Coder Social logo

yuukitoriyama / ryokucha Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 473 KB

FlickrAPIから取得したデータをOpenStreetMap上に表示する

Home Page: https://yuukitoriyama.github.io/ryokucha/index.html?q=8479tqi2fVw

License: MIT License

TypeScript 100.00%
ruby html5 javascript leafletjs flickr-api openstreetmap-api

ryokucha's Introduction

@toriyama/ryokucha

Example

下記の条件に当てはまる写真を Flickr から取得し、GeoJSON に変換します。

  • tag にkyoto,shrineを含む
  • 2015-01-01から2015-01-31の間に撮影された
  • geo タグを含む
APIKey=0123456789abcdefghgi
import { FlickrAPI } from "@toriyama/ryokucha";
import "dotenv/config";

(async () => {
	const flickr = new FlickrAPI({
		key: process.env.APIKey,
	});
	const response = await flickr.photos.search({
		tags: ["kyoto", "shrine"],
		taken_date: {
			min: new Date(2015, 1, 1),
			max: new Date(2015, 1, 31),
		},
		has_geo: true,
		extras: [
			"geo",
			"url_o",
			"url_sq",
			"date_taken",
			"owner_name",
			"description",
		],
	});
	const geojson = response.toGeoJSON();
	console.log(JSON.stringify(geojson, null, "\t"));
})();

ryokucha's People

Contributors

yuukitoriyama avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.