codeforamerica / cfapi

The Code for America API. Tracks and motivates activity and participation across the civic technology movement.
http://codeforamerica.org/api
MIT License
114 stars 53 forks source link

JSON-LD + Hydra #118

Open elf-pavlik opened 10 years ago

elf-pavlik commented 10 years ago

I just proposed leveraging JSON-LD for civic.json https://github.com/BetaNYC/civic.json/issues/9

I would also like to propose here evaluating http://hydra-cg.com as next generation hypermedia API (you can find links to tons of presentations about it on the website!)

While on that we could also take a look at https://github.com/antoniogarrote/json-ld-macros for converting output of various APIs into JSON-LD


What is Linked Data? http://www.youtube.com/watch?v=4x_xzT5eF5Q What is JSON-LD? http://www.youtube.com/watch?v=vioCbTo3C-4

elf-pavlik commented 10 years ago

you can find example JSON-LD document here: https://gist.github.com/elf-pavlik/7dd02b818001adda0dea

as you see it includes names in multiple languages and uses Geonames URIs for places - some of benefits: one can get from that URI names of given place in most languages, its geolocation, nesting in administrative units etc.

$ curl http://sws.geonames.org/3020251/ -H 'Accept: application/rdf+xml' -L
elf-pavlik commented 10 years ago

ping @pmackay @jden BTW do you know anyone from http://www.citysdk.eu/developers/ ? AFAIK they use LinkedData heavily there...

junosuarez commented 10 years ago

@elf-pavlik I haven't seen CitySDK before, sorry

elf-pavlik commented 10 years ago

just found this article: http://mozillascience.org/code-as-a-research-object-metadata-for-software-discovery/ via https://github.com/mozillascience/code-research-object/issues/15

This is a continuation of some work I’ve been doing with the Mozilla Science Lab and their ‘code as a research object’ program. There’s multiple aspects to this project including work on code and GUI prototypes, discussions around best practices for making code reusable andsoftware citation. This post explores some ideas around linked data and machine readable descriptions of software repositories with the goal being to make software more discoverable and therefore increase reuse.

pmackay commented 10 years ago

@elf-pavlik +1 for using JSON-LD for civic.json. How much is this project defining the format now, if it is parsing it?

About using Geonames, any thoughts on how to choose appropriate ontologies from a list such as http://lov.okfn.org/dataset/lov/index.html? Is Geonames the best option?

Would any UI be of use in making it easier for people to define the civic.json files, if we extend to use JSON-LD?

I know some of the people from CitySDK, what did you want to find out?

pmackay commented 10 years ago

I've had a go at defining a data model for CfAPI, still work in progress. Would be great to hear from you guys if this is useful:

https://docs.google.com/spreadsheets/d/1oSq4L6rvgQlcZDLgdalzyBnFpU41RxPEjh2HlU_s3Io/edit#gid=0

Thinking through the current API and considering this modelling, a few observations:

http://www.codeforamerica.org/api/organizations/Code-for-Philly/projects becomes http://www.codeforamerica.org/api/projects?org=Code-for-Philly

The main goal here is to reuse existing vocabularies as much as possible.

elf-pavlik commented 10 years ago

looking at it! ping @ahdinosaur since relevant to https://github.com/open-app

elf-pavlik commented 10 years ago

@pmackay have you looked at https://github.com/antoniogarrote/json-ld-macros and https://github.com/antoniogarrote/geektalk/blob/master/src/apis.js

ondrae commented 10 years ago

You guys are awesome.

I'm sick with the flu, so it might be a few days before I respond coherently.

pmackay commented 10 years ago

@ondrae sure, hope you get better soon!

ahdinosaur commented 10 years ago

thanks @elf-pavlik. looks great so far @pmackay! :)

elf-pavlik commented 10 years ago

@ahdinosaur did you work on choosing terms used in open-app roadmap? https://github.com/open-app/core/blob/master/roadmap.md

i notice there use of schema:Person and org:Organization, did you miss something in schema:Organization?

ahdinosaur commented 10 years ago

@elf-pavlik, yes, schema:Organization does not have a Membership class for storing data about the membership (when they became a member, when they stopped being a member, the role they play as a member, etc). schema:Organization also doesn't have a good way to represent abstract roles or posts (schema:potentialAction is cool, but i should be able to associate potential actions with abstract roles), which are necessary for describing holon structures.

elf-pavlik commented 10 years ago

makes sense!

have you looked at http://blog.schema.org/2014/06/introducing-role.html

ahdinosaur commented 10 years ago

@elf-pavlik, yes, but i see it in a different light now thanks. :)

pmackay commented 10 years ago

I'm wondering about the github contributors value - would the proper way to model that be to define a person object, and use that? What is supporting http://www.codeforamerica.org/geeks/ in the API currently?

I've done a number of other schema updates...

ondrae commented 10 years ago

I don't have any opinions on how to model people, yet. We're working on some other ways to track individual activity soon. I'm letting that work, and yours, influence how we model people in the code.

The info about the Geek of the Week on /geeks is hard coded for now.

I'm excited to see what other improvements you've made.

elf-pavlik commented 10 years ago

My apologies for silence, lately I've joined W3C Social Web WG and we currently work on topic of social syntax/vocabs. I'll pick up this thread once we have some progress in WG, we hope to confirm direction on mentioned topic by Sep 23rd.

elf-pavlik commented 10 years ago

I would like to move on with expressing relations Person, Organization and Projects (3 way n-n) especially for https://github.com/codeforamerica/cfapi#projects-list

@pmackay would you like to have a video call sometimes next week?

pmackay commented 10 years ago

@elf-pavlik we could, maybe Thurs/Fri?

elf-pavlik commented 10 years ago

@pmackay sounds good! let's move it to PM :email: i start playing with JSON-LD Macros, you can find very basic CFAPI example here https://gist.github.com/elf-pavlik/86238a1a80ec34795b33 as well as more json-ld macros examples for popular services

ahdinosaur commented 10 years ago

@elf-pavlik @pmackay, can i listen in on this? i'm collaborating with some folks on the same domains.

ondrae commented 10 years ago

Just found that http://g0v.tw/ is using their own version of civic.json on most of their projects called g0v.json. It uses json-ld too. They then display the projects on http://hack.g0v.tw/project

@clkao did you come up with g0v.json or get the idea from BetaNYC?

clkao commented 10 years ago

@ondrae I think we got that separately then found BetaNYC's effort. a few of us meant to discuss civic.json during CfA summit but didn't manage to at the end.

elf-pavlik commented 10 years ago

@bcomnes I see you requested IE membership in W3C Social Web WG https://www.w3.org/wiki/Socialwg#Applied_for_Membership

I would like to propose CfA as one of Social Web use cases, would you like to join the call we plan with @pmackay and @ahdinosaur? (most likely Friday evening UTC).

bcomnes commented 10 years ago

@elf-pavlik I have volunteered and worked with the organizers for the Code for Portland group in PDX, which is also a CFA brigade. There is a meeting this evening that I may attend and will bring this to the organizers attention and see who can best join that call (maybe me).

elf-pavlik commented 10 years ago

I just noticed @taisukef suggesting relevant session for upcoming W3C TPAC

5 star Civic Tech / How to promote the 5 star Open Data as the Semantic Web

almereyda commented 9 years ago

Current develepmont of what was formerly known as https://github.com/open-app/core/blob/master/roadmap.md (404) know happens in similar spaces such as World Wide Holonic Economic Ecosystem, for who would want to follow the trail.