Code Monkey home page Code Monkey logo

all-the-cities's People

Contributors

dependabot[bot] avatar ionicabizau avatar mmoanis avatar mourner avatar nabilashraf avatar oprogramador avatar zeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

all-the-cities's Issues

Timezone

Hi, it would be helpful if you would like to add the field of timezone, eg. Asia/Jakarta to the json exported.

Possible bug in test.js?

For example
t.ok(cities[0].name, 'cities have a lat')

Shouldn't this be
t.ok(cities[0].lat, 'cities have a lat')

Same for cities[0].country and cities[0].lon.

More compact data

cities.json is 33.6MB, which is a bit on the heavy side for an NPM module, and takes about a second to load in Node.

Both size and init time could be significantly reduced by using a compact binary format, such as Protocol Buffers, combined with a fast decoder such as https://github.com/mapbox/pbf.

@zeke are you up for that? The only drawback is making the module work in browsers will get slightly trickier, but on the other hand it's not very viable currently with that size.

get state of city

Hi,

Currently, the library doesn't return the state of the city and to some cases, there are cities duplicated in the same country, but it is correct because are a different state.

How can I get the state of the city, this enchantment is scheduled to next version or I need to use another library to complement the information.

Case need another library, could you me indicate one?

Thanks a lot,

How to do reverse geocode

With the function below I get list of cities in a certain country which includes lon and lat.

module.exports.getAreas = function (country) {
    const citiesArray = cities.filter(city => {
        return city.country.match(country)
    });

    return _.sortBy(citiesArray, o => o.name)
};

I want a way to use lat and lon to guess the city from this lib. Something like this:

module.exports.findArea = function (lon, lat) {
    return ........
};

I know its not the purpose of the lab, Any advice on how I can do it?

Update cities-with-1000 package

Hi Zeke,

I created this repo based on your repo and included a new version of cities-with-1000 and it worked at the time for me.

I want to restart the process by creating a better version of cities with 1000 and would need your help if you're around, let me know?

Best.

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.