Giter VIP home page Giter VIP logo

govapi's Introduction

Gov API

About: This was a quick little learning experiment on collecting all data on the US Governors, and then building an API to serve it using Django.

Retrieving the data: search.py utilized Selenium, BeautifulSoup, and Requests to completely scrape the https://www.nga.org/governors/ website and parse the data that I was looking for. Once everything was obtained I appended all data to a Pandas dataframe which was then exported as a .csv.

Building the API: For building the API I used Django as I had experimented with making a web application with it before. It was a pretty straight-forward process of hosting it just temporarily on my computer and then accessing it via a browser through localhost:8000. The only thing that caused me some issues was implementing the import resource onto the Django Admin page, but after much debugging I resolved it by adjusting my return statement on the model I had created.

Final Thoughts & Future Add Ons: Overall I think that this was a good project to continue to learn about the Django web framework, and get my hands dirty with building an API to work with GET / POST / etc. In the future I would like to adjust the API, so users are unable to POST to the database and they can only GET data. I think it would also be cool to actually make it available to the public and find a more permenant hosting solution via: my own homeserver or something like Heroku and Rapid API.

Screenshots: I've added screenshots of the API and the search.py in action below....

Frontpage of localhost: ScreenShot

Shown when completing GET request: ScreenShot

What is shown if wanting to complete POST request: ScreenShot

Django Admin showing all of the gov. data within database: ScreenShot

Import resource allowing you to import different filetypes into database: ScreenShot

Some code of search.py: ScreenShot

govapi's People

Contributors

millerlm012 avatar

Watchers

 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.