schemaorg / suggestions-questions-brainstorming

Suggestions, questions, and brainstorming
20 stars 15 forks source link

Proposal: Range #155

Open peter-dolkens opened 6 years ago

peter-dolkens commented 6 years ago

QuantitativeValue and a few other instances currently support minValue/maxValue properties

At the moment, minValue and maxValue are expected to be of type Number.

I propose expanding this in the form of a Range type:

This would allow for more broad usage in things like the proposed Schedule type, which currently uses an explicit exceptDate property (which is already incorrectly labelled, as exceptDate also supports DateTime values, making it exceptDateTime)

Instead, we would use:

which would allow us to block off an entire range of dates at once (e.g. school holidays), and would even allow flexibility when setting opening hours / schedules (openingHours could be of type Range, for example)

That's just one example where range may come in useful.

vholland commented 6 years ago

How does this interact with http://schema.org/Duration?

peter-dolkens commented 6 years ago

I'm inclined not to consider Duration myself, but I suspect that is primarily due to language bias myself.

Technically, a date/time based Range could just as easily be described as follows:

But I'd be more inclined to call that an Interval or something different again, as it shares no properties in common with the more general purpose "Range" as described above.

Peter Dolkens

On 19 Apr 2018, at 17:16, vholland notifications@github.com wrote:

How does this interact with http://schema.org/Duration?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

thadguidry commented 6 years ago

Hi @dolkensp !

  1. One context is Time. https://www.w3.org/TR/owl-time/#time:ProperInterval

  2. Your broadening context comes from the land of Programming. Such as range() https://www.pythoncentral.io/pythons-range-function-explained/ and in IoT Domain, ranges will be needed to deal with Observations and Capabilities http://iotschema.org/Capability http://w3c.github.io/sdw/ssn/#specification

I like the proposal because it can deal with both 1 and 2 above.

Range of my thermometer is minValue: -10 maxValue: 135 step: .5 unitCode: CEL unitText: Celsius

Range can also be used for defining an Interval Scale itself. Interval_Scale of Celsius https://en.wikipedia.org/wiki/Level_of_measurement#Interval_scale minValue: 0 maxValue: 100 step: 1 unitCode: INT unitText: Integer

OUT OF SCOPE RANGES :-)

Range of a set of Data (Domain: Statistics) is something entirely different. {4,6,9,3,7} the lowest value is 3, and the highest is 9, so the range is 9 - 3 = 6

Range of a set of all the output values of a function (Domain: Mathematics) function f(x) = x2 values of x = {1,2,3...} range = (1,4,9,...}

RichardWallis commented 4 years ago

See issue #7 for the context of the move from the main Schema.org issue tracker to this repository.