OpenAddressesUK / hippodamus

Open Addresses' publishing scripts that create the downloadable versions of Open Addresses' database.
http://openaddressesuk.org/docs/
MIT License
0 stars 0 forks source link

'cy' property (Welsh names) always initialised to empty arrays in the downloadable JSON version #5

Open giacecco opened 9 years ago

giacecco commented 9 years ago

Why do we have an empty array as the 'cy' property for every name, even when we don't know any Welsh names? Unless it is good practice or some pattern, I don't think it is useful. Is it a bug perhaps?

The only reason to do that would be that we know that at least one Welsh name exists and want to show that, but we don't know what it is. I don't think this is our case.

{
  "address" : {
    "url" : "http://alpha.openaddressesuk.org/addresses/7pW9D2",
    "sao" : "1ST FLOOR",
    "pao" : "36-40",
    "street" : {
      "name" : {
        "en" : [
          "THE STRAND"
        ],
        "cy" : []
      },
      "url" : "http://alpha.openaddressesuk.org/streets/no4MwN"
    },
    "nilclass" : {
      "name" : {
        "en" : [
          null
        ],
        "cy" : []
      },
      "url" : null
    },
    "locality" : {
      "name" : {
        "en" : [
          null
        ],
        "cy" : []
      },
      "url" : null
    },
    "town" : {
      "name" : {
        "en" : [
          "DERBY"
        ],
        "cy" : []
      },
      "url" : "http://alpha.openaddressesuk.org/towns/sGp6bi"
    },
    "postcode" : {
      "name" : {
        "en" : [
          "DE1 1BE"
        ],
        "cy" : []
      },
      "url" : "http://alpha.openaddressesuk.org/postcodes/Bty9pj"
    },
    "provenance" : {
      "activity" : {
        "executed_at" : "2014-12-01T15:26:12.720Z",
        "processing_scripts" : "https://github.com/OpenAddressesUK/distiller",
        "derived_from" : [
          {
            "type" : "Source",
            "urls" : [
              "http://ernest.openaddressesuk.org/addresses/689029"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.720Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          },
          {
            "type" : "Source",
            "urls" : [
              "http://alpha.openaddressesuk.org/postcodes/Bty9pj"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.720Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          },
          {
            "type" : "Source",
            "urls" : [
              "http://alpha.openaddressesuk.org/streets/no4MwN"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.721Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          },
          {
            "type" : "Source",
            "urls" : [
              "http://alpha.openaddressesuk.org/towns/sGp6bi"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.721Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          }
        ]
      }
    }
  }
}
pezholio commented 9 years ago

As I mentioned in #4, this is to mirror the structure we have at http://alpha.openaddressesuk.org/.

With regard to this specific point, I think i we should have the same structure there regardless of whether we have Welsh names or not, to avoid any confusion.

giacecco commented 9 years ago

I wouldn't find it confusing, see also my note here about cutting off from serialisations the overhead of the internal data structures.

Downgraded to enhancement, but I'm not buying it for now :-) Don't take action.