Git Product home page Git Product logo

geolookup's Introduction

This is to create a geolookup api postalcode->city name on cloudflare worker

It does download the list of data from the wonderful geonames site and build an optimised js worker

the german case

bit of voodoo to add the constituency in germany

#q ' select Wahlkreis-Nr as constituency, PLZ-GemVerwaltung as postcode from 20200415_btw21_wkr_gemeinden_utf8.csv group by postcode' -d; -H -O --as-text | sed -e 's/,/\t/g' > data/DE.constituencies.txt #cat data/postcode_constituency.csv | sed -e 's/,/\t/g' > data/DE.constituencies.txt

#q 'select c4 as constituency, c6 as postcode, c5 as name from data/BTW20214Q2020.csv where postcode is not "" group by postcode' -O -d, --as-text | sed -e 's/,/\t/g' > data/DE.constituencies.txt

mv data/DE.txt data/DE.postalcode.txt q 'select p.*, c.c1 from data/DE.postalcode.txt p left join data/DE.constituencies.txt c on c.c2=p.c2' -t --as-text > data/DE.txt

$node src/jsonify.js DE $node src/workerify.js DE $cd wrangler $yarn wrangler -e de

the french case

wget https://www.nosdeputes.fr/deputes/enmandat/json

https://raw.githubusercontent.com/regardscitoyens/nosdeputes.fr/master/batch/depute/static/circo_insee_2012.csv

$node src/fr.jsonify.js $node src/workerify.js FR $cd wrangler;yarn wrangler -e fr

https://workflow.proca.app/workflow/43

geolookup's People

Contributors

dependabot-preview[bot] avatar tttp avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.