Git Product home page Git Product logo

Comments (2)

rahulbot avatar rahulbot commented on July 19, 2024

This will take a little work. For instance, AboutnessStrategy.selectCountries doesn't know about geonames at all... it just returns country codes (based on resolvedLocation.geoname.primaryCountryCode). We'd have to add a lookup (live or static) to find the geonames entry for each country.

Same thing with AboutnessStrategy.selectStates - it just picks based on resolvedLocation.geoname.admin1Code. We'd have to add a lookup to find the Geonames entry for that state.

from cliff-annotator.

rahulbot avatar rahulbot commented on July 19, 2024

Oh, it does this now. I don't remember which version introduced this, but all the focus elements have full Geonames info in them. Here's an excerpt from v1.1.x:

      "focus": {
        "states": [
          {
            "name": "National Capital Territory of Delhi",
            "countryCode": "IN",
            "featureCode": "ADM1",
            "lon": 77.1,
            "score": 1,
            "stateCode": "07",
            "featureClass": "A",
            "lat": 28.6667,
            "id": 1273293,
            "population": 15766943
          }
        ],
        "cities": [
          {
            "name": "New Delhi",
            "countryCode": "IN",
            "featureCode": "PPLC",
            "lon": 77.22445,
            "score": 1,
            "stateCode": "07",
            "featureClass": "P",
            "lat": 28.63576,
            "id": 1261481,
            "population": 317797
          }
        ],
        "countries": [
          {
            "name": "Republic of India",
            "countryCode": "IN",
            "featureCode": "PCLI",
            "lon": 79,
            "score": 1,
            "stateCode": "00",
            "featureClass": "A",
            "lat": 22,
            "id": 1269750,
            "population": 1173108018
          }
        ]
      }

from cliff-annotator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.