Code Monkey home page Code Monkey logo

python-geolocation-plot's Introduction

forthebadge

alt tag

Description

  • In this project, we are using the Google geocoding API to clean up some user-entered geographic locations of university names and then placing the data on a Google Map. (Where.data contains user-entered Data !).

Installation Instructions โ•

  • clone or download the repo. into any fresh temporary folder.

  • cd into that root folder you just cloned locally.

  • if you want to enter user defined data then please enter it in where.data file just add the name of the place,institution you want to visualize on the map.

  • to Query Data written in where.data using Google API Run !

    geoload.py
  • to read the data from the database so you can visualize it on a map Run !
    geodump.py 
  • Open where.html to view the data in a browser.

How it Works !

  • In the first phase we take our input data in the file (where.data) and read it one line at a time, and retreive the geocoded response and store it in a database (geodata.sqlite).Before we use the geocoding API, we simply check to see if we already have the data for that particular line of input.You can re-start the process at any time by removing the file geodata.sqlite.

  • Run the geoload.py program.This program will read the input lines in where.data and for each line check to see if it is already in the database and if we don't have the data for the location,call the geocoding API to retrieve the data and store it in the database.

  • The geoload.py can be stopped at any time, and there is a counter that you can use to limit the number of calls to the geocoding API for each run.Once you have some data loaded into geodata.sqlite, you can visualize the data using the (geodump.py) program. This program reads the database and writes tile file (where.js) with the location, latitude, and longitude in the form of executable JavaScript code.

  • A run of the geodump.py program records written to where.js Open where.html to view the data in a browser The file (where.html) consists of HTML and JavaScript to visualize a Google Map. It reads the most recent data in where.js to get the data to be visualize.

  • This is a JavaScript list of lists. The syntax for JavaScript list constants is very similar to Python so the syntax should be familiar to you.

  • Simply open where.html in a browser to see the locations. You can hover over each map pin to find the location that the gecoding API returned for the user-entered input. If you cannot see any data when you open the where.html file, you might want to check the JavaScript or developer console for your browser.

  • I have attached screenshots below depicting various features of applicationIn the first phase we take our input data in the file (where.data) and read it one line at a time, and retreive the

Contributing

  1. Create your branch: git checkout -b my-new-feature

  2. Commit your changes: git commit -m 'Add some feature'

  3. Push to the branch: git push origin my-new-feature

  4. Send a Pull Request

  5. Enjoy!

Examples !

python-geolocation-plot's People

Contributors

divyanshu-rawat 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.