Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Irish Cities #21

Open
bsodmike opened this issue Oct 25, 2016 · 0 comments
Open

Missing Irish Cities #21

bsodmike opened this issue Oct 25, 2016 · 0 comments

Comments

@bsodmike
Copy link

Hi all,

I've used the following as a means to generate all Irish cities,

module MyApp
  class Country
    def initialize(country_code)
      @country_code = country_code
    end

    def cities
      cities = []
      state_keys = get_states.keys
      state_keys.each do |state|
        cities << ::CS.cities(state, @country_code)
      end

      cities.flatten.uniq.sort
    end

    private

    def get_states
      ::CS.get(@country_code)
    end
  end
end

However, this does not seem to be complete?

[1] pry(main)> MyApp::Country.new(:ie).cities
=> ["Abbeydorney",
 "Abbeyfeale",
 "Abbeyleix",
 "Achill",
 "Adare",
 "Allenwood",
 "Annacotty",
 "Ardee",
 "Arklow",
 "Artane",
 "Ashbourne",
 "Ashtown",
 "Athboy",
 "Athenry",
 "Athlone",
 "Athy",
 "Bagenalstown",
 "Bailieborough",
 "Balbriggan",
 "Baldoyle",
 "Ballaghaderreen",
 "Ballina",
 "Ballinagleragh",
 "Ballinalee",
 "Ballinasloe",
 "Ballincollig",
 "Ballinhassig",
 "Ballinrobe",
 "Ballitore",
 "Ballsbridge",
 "Ballyboden",
 "Ballybrittas",
 "Ballydesmond",
 "Ballyduff",
 "Ballyfermot",
 "Ballyjamesduff",
 "Ballymacelligott",
 "Ballymahon",
 "Ballymore Eustace",
 "Ballymun",
 "Ballyshannon",
 "Ballyvaghan",
 "Baltinglass",
 "Bandon",
 "Bantry",
 "Barrack",
 "Beaumont",
 "Belgooly",
 "Bettystown",
 "Birr",
 "Blackpool",
 "Blackrock",
 "Blanchardstown",
 "Blarney",
 "Blessington",
 "Boyle",
 "Bray",
 "Bruff",
 "Bruree",
 "Buncrana",
 "Bunratty",
 "Burren",
 "Cabinteely",
 "Cabra",
 "Caher",
 "Cappoquin",
 "Carbury",
 "Carlow",
 "Carndonagh",
 "Carraroe",
 "Carrick",
 "Carrick on Shannon",
 "Carrick-on-Suir",
 "Carrickmacross",
 "Carrickmines",
 "Carrigaline",
 "Carrigallen",
 "Carrigtohill",
 "Cashel",
 "Castlebar",
 "Castleblayney",
 "Castleknock",
 "Cavan",
 "Celbridge",
 "Clane",
 "Clara",
 "Clarecastle",
 "Claregalway",
 "Claremorris",
 "Clogherhead",
 "Clonakilty",
 "Clondalkin",
 "Clonee",
 "Clonmel",
 "Clonsilla",
 "Clontarf",
 "Cobh",
 "Collinstown",
 "Cork",
 "Crumlin",
 "Dalkey",
 "Delgany",
 "Donabate",
 "Donacarney",
 "Donaghmore",
 "Donegal",
 "Donnybrook",
 "Donore",
 "Douglas",
 "Drogheda",
 "Droichead Nua",
 "Dromahair",
 "Dromore West",
 "Drumcondra",
 "Dublin",
 "Duleek",
 "Dunboyne",
 "Dundalk",
 "Dundrum",
 "Dungarvan",
 "Dunglow",
 "Dunlavin",
 "Dunleer",
 "Dunmanway",
 "Dunshaughlin",
 "Dún Laoghaire",
 "Edenderry",
 "Enfield",
 "Ennis",
 "Enniscorthy",
 "Fermoy",
 "Finglas",
 "Firhouse",
 "Foxford",
 "Foxrock",
 "Galway",
 "Garristown",
 "Glasnevin",
 "Glassan",
 "Glenageary",
 "Gorey",
 "Gort",
 "Granard",
 "Greystones",
 "Harold's Cross",
 "Headford",
 "Howth",
 "Islandbridge",
 "Kanturk",
 "Kells",
 "Kenmare",
 "Kilbarrack",
 "Kilbeggan",
 "Kilbride Cross Roads",
 "Kilcock",
 "Kilcoole",
 "Kildalkey",
 "Kildare",
 "Kilfinane",
 "Kilkee",
 "Kilkenny",
 "Kilkishen",
 "Killaloe",
 "Killarney",
 "Killeshin",
 "Killiney",
 "Killucan",
 "Kilmessan",
 "Kiltamagh",
 "Kingswood",
 "Kinnegad",
 "Kinsale",
 "Kinvarra",
 "Lanesborough",
 "Laytown",
 "Leixlip",
 "Leopardstown",
 "Letterkenny",
 "Lifford",
 "Limerick",
 "Listowel",
 "Longford",
 "Longwood",
 "Loughlinstown",
 "Loughrea",
 "Louth",
 "Lucan",
 "Lusk",
 "Macroom",
 "Malahide",
 "Mallow",
 "Marino",
 "Maynooth",
 "Mayo",
 "Midleton",
 "Mitchelstown",
 "Moate",
 "Monaghan",
 "Monamolin",
 "Monkstown",
 "Mornington",
 "Mountshannon",
 "Moville",
 "Mullingar",
 "Multyfarnham",
 "Naas",
 "Naul",
 "Navan",
 "Nenagh",
 "New Quay",
 "New Ross",
 "Newcastle",
 "Newcastle West",
 "Newmarket",
 "Newport",
 "Nohaval",
 "Oranmore",
 "Oughterard",
 "Ovens",
 "Piltown",
 "Portarlington",
 "Porterstown",
 "Portlaoise",
 "Portmarnock",
 "Portumna",
 "Quin",
 "Raheny",
 "Rath Luirc",
 "Rathanna",
 "Rathcoole",
 "Rathfarnham",
 "Rathmines",
 "Rathmore",
 "Ratoath",
 "Rhode",
 "Ringsend",
 "Riverstown",
 "Rochestown",
 "Rochfortbridge",
 "Roscommon",
 "Roscrea",
 "Rush",
 "Saggart",
 "Sallins",
 "Sandycove",
 "Sandyford",
 "Sandymount",
 "Santry",
 "Shankill",
 "Shannon",
 "Sixmilebridge",
 "Skerries",
 "Slane",
 "Sligo",
 "Spiddal",
 "Stepaside",
 "Stillorgan",
 "Streamstown",
 "Summerhill",
 "Sutton",
 "Swinford",
 "Swords",
 "Taghmon",
 "Tallaght",
 "Templeogue",
 "Terenure",
 "Thurles",
 "Tipperary",
 "Tralee",
 "Tramore",
 "Trim",
 "Tuam",
 "Tullamore",
 "Tullow",
 "Virginia",
 "Waterfall",
 "Waterford",
 "Watergrasshill",
 "Westport",
 "Wexford",
 "Wicklow",
 "Youghal"]

For example, the city/town of Oldcastle is missing, and I'm sure there are many more. Appreciate any advice please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant