Field types (Leo's) - #2
Conversation
This reverts commit 21bc280.
| - **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. | ||
| - **Positive Integer** - The field contains a non-negative whole number (which includes 0). | ||
| - **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. E.g. "en" for English, "en-US" for American English or "de" for German. | ||
| - **Latitude** - The field contains the WGS84 latitude as a float number (it includes decimals). The value must be higher and -90.0 and smaller than 90.0. |
There was a problem hiding this comment.
For lat and long, I would change this to a floating point (i.e., decimal) number
There was a problem hiding this comment.
I would change to `The value must be greater than or equal to -90.0 and less than or equal to 90.0."
There was a problem hiding this comment.
Done. But I removed the (i.e.,decimal) which was cutting the definition in half and I got stuck at "what is a floating point?"
There was a problem hiding this comment.
I'm adding an example at the end.
There was a problem hiding this comment.
So technically this should actually read The field contains the WGS84 latitude in decimal degrees.
"decimal degrees" is the way the numeric decimal format is usually described (as opposed to degrees/minutes/seconds).
| - **Positive Integer** - The field contains a non-negative whole number (which includes 0). | ||
| - **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. E.g. "en" for English, "en-US" for American English or "de" for German. | ||
| - **Latitude** - The field contains the WGS84 latitude as a float number (it includes decimals). The value must be higher and -90.0 and smaller than 90.0. | ||
| - **Longitude** - The field contains the WGS84 longitude as a float number (it includes decimals). The value must be higher and -180.0 and smaller than 180.0. |
There was a problem hiding this comment.
I would change to `The value must be greater than or equal to -180.0 and less than or equal to 180.0."
| - **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. E.g. "en" for English, "en-US" for American English or "de" for German. | ||
| - **Latitude** - The field contains the WGS84 latitude as a float number (it includes decimals). The value must be higher and -90.0 and smaller than 90.0. | ||
| - **Longitude** - The field contains the WGS84 longitude as a float number (it includes decimals). The value must be higher and -180.0 and smaller than 180.0. | ||
| - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for Septembre 13th, 2018. |
There was a problem hiding this comment.
I would use the U.S. English spelling for Septembre instead - September
There was a problem hiding this comment.
Grrrrrr.
I totally agree, but my fingers are so confused. I've spent the last 13 days fighting when I'm writing "septembre" in French, that I'm writing "Septembre", and I see that now I have it back in French, I'm mixing it in English.
| - **Longitude** - The field contains the WGS84 longitude as a float number (it includes decimals). The value must be higher and -180.0 and smaller than 180.0. | ||
| - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for Septembre 13th, 2018. | ||
| - **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. | ||
| - **Text string** - The field contains a string of UTF-8 caracters, which is aimed to be displayed to the rider and which must therefore be readable. |
| - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for Septembre 13th, 2018. | ||
| - **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. | ||
| - **Text string** - The field contains a string of UTF-8 caracters, which is aimed to be displayed to the rider and which must therefore be readable. | ||
| - **Timezone** - The field contains a TZ timezone from the TZ database. Timezone names never contain the space character but may contain an underscore. Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. E.g. "Asia/Tokyo", "America/Los_Angeles" or "Africa/Cairo". |
|
|
||
| ## Field Types | ||
|
|
||
| - **Ad-hoc** - Please see the detail column of the field for the definition of the field type. |
There was a problem hiding this comment.
Which fields would this describe? Without knowing that, I think Misc is probably a better value.
There was a problem hiding this comment.
I've mainly done it for currency_type(ISO 4217) and agency_phone (which should be E123 but currently isn't specified as such).
But to answer your question I've checked every field and it could also be used for:
- agency_email, feed_contact_email (but I can add a type for that now that I see there are two of them)
- shape_dist_traveled (positive float)
- price (positive float)
- feed_version (not an ID, not really a Text string)
There was a problem hiding this comment.
I must confess I don't like "Misc", it sounds as "what we haven't sorted". Ad-hoc is distinct, it is saying that the format is distinct.
But if another anglo endorse the "Misc", I'll go for it. @antrim?
There was a problem hiding this comment.
I must confess I don't like "Misc", it sounds as "what we haven't sorted".
Isn't that what it is :)?
I'm not married to "Misc", but "Ad-Hoc" definitely doesn't sound right. To me in English "Ad-Hoc" implies something that's a "one-off" or something done once for a particular purpose without organization. To me it almost implies that you could put whatever you want in that field.
Thinking more, I'd actually vote to remove this type entirely and just list all types here, even if they only occur once in the spec.
There was a problem hiding this comment.
I'm adding the Non-negative float type (roll eyes) and the email type.
There was a problem hiding this comment.
Regarding ad-hoc, I'm just gonna remove it.
| ## Field Types | ||
|
|
||
| - **Ad-hoc** - Please see the detail column of the field for the definition of the field type. | ||
| - **Color** - The field contains a color encoded as a six-character hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value. E.g. "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. |
There was a problem hiding this comment.
I would add ...hexadecimal number. A leading "#" is not included.
There was a problem hiding this comment.
I'm adding the # comment after the "valid value". Because when you read the definition as "a six-character hexadecimal number", you don't see why we speak about not including the #. There is no hash in a six-character hexadecimal number.
|
|
||
| - **Ad-hoc** - Please see the detail column of the field for the definition of the field type. | ||
| - **Color** - The field contains a color encoded as a six-character hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value. E.g. "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. | ||
| - **Enum** - The field contains a value among a set of ad-hoc predefined constants defined in the "Details" column. E.g. the route_type field contains a "0" for tram, a "1" for subway... |
There was a problem hiding this comment.
I would say The field contains a value from...
I would remove ad-hoc.
There was a problem hiding this comment.
We might want to consider replacing all E.g. with For example, to be clearer.
| - **Color** - The field contains a color encoded as a six-character hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value. E.g. "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. | ||
| - **Enum** - The field contains a value among a set of ad-hoc predefined constants defined in the "Details" column. E.g. the route_type field contains a "0" for tram, a "1" for subway... | ||
| - **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. | ||
| - **Positive Integer** - The field contains a non-negative whole number (which includes 0). |
There was a problem hiding this comment.
As ugly as it is, I think this type must be named Non-negative Integer - "positive" by definition excludes 0.
And, I'd change the definition to The field contains a the value 0 or a positive whole number.
There was a problem hiding this comment.
"positive" by definition excludes 0.
Haha. Oh God. Not in French Math (aka not in real Math). But yeah, I've heard that's how you do Math. It is so confusing. Zero is obviously positive and negative. This is why we have N* and Z*. Anyway... #DontStartMeOnThat #ThisIsWhyWeHave12FieldsMedals #LongLiveNAndZStar
There was a problem hiding this comment.
Anyway. I'll replace "Positiv" by "Non-negative".
|
@LeoFrachet I've left a few comments in-line. |
|
@barbeau: I've answered to most of your comments, accepting most of them (sometime reluctantly). |
|
@barbeau: updated using your second reviewing. |
| File: **Required** | ||
|
|
||
| | Field Name | Required | Details | | ||
| | Field Name | Required & Type | Details | |
There was a problem hiding this comment.
I would separate "Type" into it's own column. GTFS-realtime has:
| Field Name | Type | Required | Cardinality | Description |
|---|
For example:
https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-feedmessage
There was a problem hiding this comment.
But we don't need "Cardinality" here
antrim
left a comment
There was a problem hiding this comment.
LGTM. I left a few suggestions and comments.
| - **Longitude** - The field contains the WGS84 longitude as a a floating point number. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. | ||
| - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. | ||
| - **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. | ||
| - **Text string** - The field contains a string of UTF-8 characters, which is aimed to be displayed to the rider and which must therefore be human readable. |
There was a problem hiding this comment.
…which is aimed to be displayed to the rider and which must therefore be human readable.
Should we remove that last clause?
stop_desc, route_desc, and feed_version would all be text fields (I think) but are not necessarily intended to be displayed to the rider. Well, actually stop_desc, route_desc have an ambiguous purpose.
There was a problem hiding this comment.
feed_version is a stretch I agree. I can remove it.
But description field are often used to be shown to the rider.
| - **Non-negative Float** - The field contains a non-negative floating point number (which includes 0). | ||
| - **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). | ||
| - **Phone number** - The field contains a phone number. | ||
| - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. |
There was a problem hiding this comment.
I suggest changing the order of these sentences and a few other language times.
The field contains the service date in the YYYYMMDD format. E.g "20180913" for September 13th, 2018. Because service times can be past 24:00:00, a service date may include transit operations on the subsequent real calendar day(s).
| - **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). | ||
| - **Phone number** - The field contains a phone number. | ||
| - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. | ||
| - **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. |
There was a problem hiding this comment.
This introduces a new term -- "Service Time". I just want to check that everyone is good with this. I think I'd rather just use "Time", because I think that all time fields in GTFS match this definition. I understand what "Service Time" means, but I think it is possible that adding "Service" might add potential for confusion rather than add clarity.
There was a problem hiding this comment.
Oh ok. But I'm using it with service date, to show that those are not usual date & time. So if you think we should remove it there, then I would advocate to also remove it in service date.
| - **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. For example: "en" for English, "en-US" for American English or "de" for German. | ||
| - **Latitude** - The field contains the WGS84 latitude in decimal degrees. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Roma. | ||
| - **Longitude** - The field contains the WGS84 longitude in decimal degrees. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. | ||
| - **Non-negative Float** - The field contains a non-negative floating point number (which includes 0). |
There was a problem hiding this comment.
How about adding "decimal" for people who don't immediately know what "floating point" means.
"The field contains a non-negative floating point number (i.e. allowing decimals), which includes 0."
There was a problem hiding this comment.
I also do not find "floating point number" obvious. But I don't know how to be clear on this one.
There was a problem hiding this comment.
I think this works - The field contains a non-negative floating point (i.e., decimal) number, which includes 0.
| - **Latitude** - The field contains the WGS84 latitude in decimal degrees. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Roma. | ||
| - **Longitude** - The field contains the WGS84 longitude in decimal degrees. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. | ||
| - **Non-negative Float** - The field contains a non-negative floating point number (which includes 0). | ||
| - **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). |
There was a problem hiding this comment.
If the previous change is accepted, then I suggest replacing the parens with a comma for consistency.
Non-negative Integer - The field contains a non-negative whole number, which includes 0.
|
The definition of float is still under discussion, but I would advocate to still open this PR on the official repo. the discussion can continue there. |
|
Move to google#104 |
# This is the 1st commit message: add tripupdate clarification # This is the commit message #2: fixed formatting # This is the commit message #3: Clarify detour description in service alerts Updated detour description for clarity. # This is the commit message #4: Clarify DETOUR effect description in reference.md Updated the description of the DETOUR effect to clarify that it refers to stops not being served. # This is the commit message #5: better detour definition
I've removed the definition which weren't about data type for now (required, optional...)
As explained in https://github.com/MobilityData/Tasks/issues/3, I've focused on factorizing the definition appearing multiple times in the existing spec.