infochimps-labs / icss

Infochimps Stupid Schema library: an avro-compatible data description standard. ICSS completely describes a collection of data (and associated assets) in a way that is expressive, scalable and sufficient to drive remarkably complex downstream processes.
http://infochimps.com
MIT License
9 stars 1 forks source link

Core Types Omnibus bug #10

Open mrflip opened 13 years ago

mrflip commented 13 years ago

Curable pecadilloes of the core types -- esp if they come from schema.org

mrflip commented 13 years ago

What are the ramifications of the following: A GeoCoordinates object should not allow any property that cannot be pivoted into a proper GeoJSON property.

mrflip commented 13 years ago

resolved: Intangible is not is_a: Thing NOTE THE RAMIFICATIONS OF THIS: possibly breaking compatibility with external schema.org libraries. However, restoring compatibility is as easy as a one-line fix -- at which point we will restore the line and pursue a deeper solution

mrflip commented 13 years ago
street_address              "1214 W 6th St"
address_prenum                ""
address_number                "1214"      Note: should be a string, not a number ("1214-A")
street_prefix                 "W"
street_basename               "6th"
street_type                   "St"
address_extended              "Suite 202"
country_id                    "us"
address_country        "United States of America"
address_locality         "Austin"
address_region          "Texas"
postal_code                   "78705" "78705-1234" may be the simple (in the us, 5-digit) or full (zip+4) version
post_office_box_number
address_type                  a space separated string corresponding to a collection of hCard `address_type`s [work|home|pref|postal|dom|intl]
kornypoet commented 13 years ago

Review types to add _id field where appropriate (incuding foreign keys).

mrflip commented 13 years ago

Notes on the core_types proposals:

https://github.com/infochimps/geo_adventure/wiki/wiki_article

    {
      "name"                 => "Lake Austin", # This is the title of the Wikipedia Article
      "url"                  => "http://en.wikipedia.org/wiki/Lake_Austin",
      "description"          => "The short abstract would go here",
      "wikipedia_id"         => "Lake_Austin", # This is the external Wikipedia id
      "wikipedia_numeric_id" => 5685146,       # This is the internal Wikipedia id
      "external_links"       => [              # Potential external links from this article
        "http://www.tpwd.state.tx.us/fishboat/fish/recreational/lakes/austin/",
        "http://geonames.usgs.gov/pls/gnispublic/f?p=gnispq:3:1586342587462945::NO::P3_FID:1372360",
      ],
      "article_sections"     => [              # The Wikipedia article categories
        "Texas geography stubs",
        "Reservoirs in Texas",
        "Geography of Austin, Texas"
      ]
      "content_location"     => {              # An article that is geo-located will populate this field
        "geo"                => {
          "longitude"        => -97.78633,
          "latitude"         => 30.294333,
        }
      },
      "extended_properties"  => {},            # Dbpedia infobox semantic web properties could go here
      "extended_identifiers" => {
        "opencyc_id"         => "Mx4rVdYydIrZEdaAAAACs0uFOQ",
        "geonames_id"        => 4704353,
        "freebase_mid"       => "m/0165v1",
      }
      "relations"            => {              # Dbpedia supplies referenced links for some articles
        { "rel" => "geo_related", "to"    => "wikipedia_id:Austin", },
        { "rel" => "redirects",   "from"  => "wikipedia_id:Lake_austin", },
        { "rel" => "redirects",   "from"  => "wikipedia_id:Austin_lake", },
      ],
      "aspects"              => [          
        "content_location",                    # This particular article could be transformed into a place using the content_location property
        { "type" => "core.person", ...}        # if it had the aspect of Person too
      ]
    }

Transformed into an Icss::Core::Landform is may look like this:

    {
      "name"                 => "Lake Austin",
      "url"                  => "http://en.wikipedia.org/wiki/Lake_Austin",
      "description"          => "The short abstract would go here",
      "geo"                  => {
        "longitude"            => -97.78633,
        "latitude"             => 30.294333,
      }
      "extended_properties"  => [],
      "extended_identifiers" => {
        "opencyc_id"         => "Mx4rVdYydIrZEdaAAAACs0uFOQ",
        "geonames_id"        => 4704353,
        "freebase_mid"       => "m/0165v1",
      }
      "relations"            => {              # Dbpedia supplies referenced links for some articles
        { "rel" => "geo_related", "to"    => "wikipedia_id:Austin", },
        { "rel" => "redirects",   "from"  => "wikipedia_id:Lake_austin", },
        { "rel" => "redirects",   "from"  => "wikipedia_id:Austin_lake", },
      ],
      "aspects"              => [ # The original Wikipedia Article data that couldn't be recieved gets dumped in here
        {
          "type"                 => "icss.core.wikipedia_article",
          "_aspect_via"          => "content_location",
          "wikipedia_id"         => "Lake_Austin", # This is the external Wikipedia id
          "wikipedia_numeric_id" => 5685146,       # This is the internal Wikipedia id
          "url"                  => "http://en.wikipedia.org/wiki/Lake_Austin",
          "description"          => "The short abstract would go here",
          "external_links"       => [              # Potential external links from this article
            "http://www.tpwd.state.tx.us/fishboat/fish/recreational/lakes/austin/",
            "http://geonames.usgs.gov/pls/gnispublic/f?p=gnispq:3:1586342587462945::NO::P3_FID:1372360",
          ],
          "article_sections"     => [              # The Wikipedia article categories
            "Texas geography stubs",
            "Reservoirs in Texas",
            "Geography of Austin, Texas"
          ]
        }
      ]
    }