All Projects → molybdenum-99 → Reality

molybdenum-99 / Reality

Licence: mit
Comprehensive data proxy to knowledge about real world

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Reality

World Cup.json
Free open public domain football data for the world cups in JSON incl. Russia 2018 and more - No API key required ;-)
Stars: ✭ 152 (-80.88%)
Mutual labels:  api, opendata
Dataiku Contrib
Public repository for DSS plugins
Stars: ✭ 76 (-90.44%)
Mutual labels:  api, opendata
Openapi Directory
🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
Stars: ✭ 2,635 (+231.45%)
Mutual labels:  api, opendata
Finmind
Open Data, more than 50 financial data. 提供超過 50 個金融資料(台股為主),每天更新 https://finmind.github.io/
Stars: ✭ 1,357 (+70.69%)
Mutual labels:  api, opendata
Wiki
Wikipedia Interface for Node.js
Stars: ✭ 180 (-77.36%)
Mutual labels:  api, wikipedia
Learn Anything
Organize world's knowledge, explore connections and curate learning paths
Stars: ✭ 13,532 (+1602.14%)
Mutual labels:  api, knowledge
Wobike
Documentation of Bike Sharing APIs 🚴🛴🛵
Stars: ✭ 705 (-11.32%)
Mutual labels:  api, opendata
Client
GitLab API v4 client for PHP
Stars: ✭ 763 (-4.03%)
Mutual labels:  api
Ftl
The Pi-hole FTL engine
Stars: ✭ 776 (-2.39%)
Mutual labels:  api
Go Swagger
Swagger 2.0 implementation for go
Stars: ✭ 7,058 (+787.8%)
Mutual labels:  api
Tyk
Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
Stars: ✭ 6,968 (+776.48%)
Mutual labels:  api
Syspass
Systems Password Manager
Stars: ✭ 763 (-4.03%)
Mutual labels:  api
Pytradfri
IKEA Trådfri/Tradfri API. Control and observe your lights from Python. Examples available. On pypi. Sans-io.
Stars: ✭ 778 (-2.14%)
Mutual labels:  api
Gitbeaker
🤖 GitLab API NodeJS library with full support of all the Gitlab API services.
Stars: ✭ 755 (-5.03%)
Mutual labels:  api
Apidoc
RESTful API 文档生成工具,支持 Go、Java、Swift、JavaScript、Rust、PHP、Python、Typescript、Kotlin 和 Ruby 等大部分语言。
Stars: ✭ 785 (-1.26%)
Mutual labels:  api
Frontend Challenges
💥 Listing some playful open-source's challenges of companies to test your knowledge
Stars: ✭ 7,211 (+807.04%)
Mutual labels:  knowledge
Ngx Restangular
Restangular for Angular 2 and higher versions
Stars: ✭ 787 (-1.01%)
Mutual labels:  api
Nei Toolkit
NEI 接口文档管理平台配套自动化工具
Stars: ✭ 781 (-1.76%)
Mutual labels:  api
Kin Openapi
OpenAPI 3.0 implementation for Go (parsing, converting, validation, and more)
Stars: ✭ 776 (-2.39%)
Mutual labels:  api
Kroki
Creates diagrams from textual descriptions!
Stars: ✭ 774 (-2.64%)
Mutual labels:  api

Reality

Gem Version Join the chat at https://gitter.im/molybdenum-99/reality

Reality is experimental Ruby library/set of libraries to provide uniform query access to heterogenous web API, with accent on real-world knowledge ones. It emphasizes simplicity of data access and interoperability of data from various sources.

The ultimate goal is to make the world inspectable and computable.

Some demos:

require 'reality' # the core library
require 'reality/miracles' # some demo-friendly shortcuts

# wikipedia

# single entry
cm = Reality.wikipedia.get('Chiang Mai')
# => #<Reality::Entity wikipedia:en://Chiang Mai>

cm.describe
# => #<Reality::Entity wikipedia:en://Chiang Mai>
#                   meta.title: Chiang Mai
#                     meta.url: https://en.wikipedia.org/wiki/Chiang_Mai
#                   meta.image: https://upload.wikimedia.org/wikipedia/commons/7/76/Chiang_Mai_City.png
# ....
#                  native_name: เชียงใหม่
# ....
#             subdivision_type: Country
#             subdivision_name: <wikipedia:en://Thailand>
#            subdivision_type1: <wikipedia:en://Provinces of Thailand (Province)>
#            subdivision_name1: <wikipedia:en://Chiang Mai Province>
#            subdivision_type2: <wikipedia:en://Amphoe>
#            subdivision_name2: <wikipedia:en://Mueang Chiang Mai District (Mueang Chiang Mai)>
#                 leader_title: Mayor
#                  leader_name: Tatsanai Puranupakorn
#               area_total_km2: 40.22km²
#               area_metro_km2: 2,905km²
#             population_as_of: 2017
#             population_total: 131,091people
# ....
#                   utc_offset: +07:00
#                  coordinates: 18°47'43"N 98°59'55"E
# .....

# navigation through data
cm.subdivision_name.describe
# => #<Reality::Entity wikipedia:en://Thailand>
#               meta.title: Thailand
#                 meta.url: https://en.wikipedia.org/wiki/Thailand
#               meta.image: https://upload.wikimedia.org/wikipedia/commons/a/a9/Flag_of_Thailand.svg
#              native_name: {native name:th|ราชอาณาจักรไทย}, {lang:th-Latn|Ratcha-anachak Thai}
#               image_flag: <wikipedia:en://File:Flag of Thailand.svg>
#               image_coat: <wikipedia:en://File:Garuda Emblem of Thailand.svg>
#          national_anthem: <wikipedia:en://Thai National Anthem (Phleng Chat Thai)>, ({lang-en:"Thai National Anthem"}),
#             royal_anthem: <wikipedia:en://Sansoen Phra Barami>, ({lang-en:"Glorify His prestige"}),
#                image_map: <wikipedia:en://File:Location Thailand ASEAN.svg>
# ....
#                  capital: <wikipedia:en://Bangkok>
#              coordinates: 13°45'0"N 100°29'0"E
# ....

# lists of entities
cities = Reality.wikipedia.query(category: 'Cities and towns in Thailand').all
# => [#<Reality::Link wikipedia:en://Amnat Charoen>, #<Reality::Link wikipedia:en://Bueng Kan>, #<Reality::Link wikipedia:en://Buriram>, #<Reality::Link wikipedia:en://Cha-am District>, #<Reality::Link wikipedia:en://Chai Nat>, #<Reality::Link wikipedia:en://Chai Prakan>, #<Reality::Link wikipedia:en://Chaiyaphum>, #<Reality::Link wikipedia:en://Chiang Dao Subdistrict>, #<Reality::Link wikipedia:en://Chiang Mai>, ...
cities.first.population_total
# => #<Reality::Measure 26,118 people>

# Wikidata (structured Wikipedia-alike data storage)
cm2 = Reality.wikidata.query(label: 'Chiang Mai').first
# => #<Reality::Link wikidata://Q52028 (Chiang Mai)>
cm2.describe
# => #<Reality::Entity wikidata://Q52028>
#                                  meta.id: Q52028
#                               meta.label: Chiang Mai
#                         meta.description: city in Chiang Mai province, Thailand
#  ...
#                              instance of: <wikidata://Q15141632 (Thesaban Nakhon)>, <wikidata://Q1549591 (big city)>
#  ...
#                              sister city: <wikidata://Q819613 (Uozu)>, <wikidata://Q128186 (Saitama Prefecture)>, <wikidata://Q182852 (Kunming)>, <wikidata://Q42956 (Harbin)>
#                              GeoNames ID: 1153671
#            category for people born here: <wikidata://Q8078994>
# category for films shot at this location: <wikidata://Q7140299 (Category:Films shot in Chiang Mai)>
#        category for people who died here: <wikidata://Q27062063>
#        Encyclopædia Britannica Online ID: place/Chiang-Mai
# ...

# Interaction Wikipedia→Wikidata:
cm = Reality.wikipedia.get('Chiang Mai')
cm['meta.wikidata'].load.describe
# => #<Reality::Entity wikidata://Q52028>
#    meta.id: Q52028
# meta.title: Q52028
# meta.label: Chiang Mai
# ...

# Wikipedia→OpenStreetMap
Reality.osm.query(around: cm, radius: 30_000, aerodrome: 'international').all
# => [#<Reality::Link osm://way(90429204) (Chiang Mai International Airport)>]

# Wikipedia→OpenWeatherMap
Reality.open_weather_map.query(at: cm).first.describe
# => #<Reality::Entity openweathermap://1153671>
#       temp: 33°C
#   pressure: 1,007hPa
#   humidity: 55%
#   temp_min: 33°C
#   temp_max: 33°C
# visibility: 10000
# wind_speed: 4.6m/s
#   wind_deg: 160°
# clouds_all: 40
#  timestamp: 2018-05-27 13:00:00 +0300
#    country: TH
#    sunrise: 2018-05-27 01:46:48 +0300
#     sunset: 2018-05-27 14:55:42 +0300
#       name: Chiang Mai
#      coord: 18°48'0"N 99°0'0"E

!!!IMPORTANT!!! This is pre-release of new, completely rewritten version. Previos version turned to be a (nice-looking) dead end. It still can be found at old-prototype branch, and installed as a gem version 0.0.5.

Current state is very WIP subject to lot of changes

See also the explanatory presentation and video, made at RubyConfIndia 2018.

Stay tuned for large and important updates!

Credits

Development of first version was sponsored by 2015 Ruby Association Grant.

Initial idea is inspired by "integrated data" of Wolfram Language.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].