RESTful/wrapper APIs. Used the FBI Crime Data Explorer API.
This is a back-end restful-wrapper API created to meet the new CORS requirements of the FBI API. It specifically designed to access real time Data provided by the public FBI API.
This website makes a call from the Back-End to the public FBI API. Also its has its own CORS which are in this case deleted to be able to call it as a mid way step from the Front-End part of this project that you can find HERE.
This website uses Python and Flask to route viewers through the site. The data was originally being called from the front-end using Javascript and JQuery code. Mid-way through the project the FBI API changed not only creating a unic API key for each user (provided at request) but also restructuring the data provided, including more and better parameters for the searchs. This changes also included the use of CORS, (Cross-Origin Resource Sharing) that avoided the calls from the front end. This made necessary the creation of a specific back end (restful-wrapper API) to meet the new requirements.
- Python3
- Base language used to create Back-End.
- Used Flask as the framework for Python.
- All code used on the site has been tested to ensure everything is working as expected.
- Used several URL extensions to make sure the data for the different crimes (offenders and victims) displayed correctly and in a JSON format.
- Navigate to the repository where you're setting up your deployments.
- Under your repository name, click Settings.
- Go to GitHub Pages section.
- Click and choose master branch.
- Click save.
- Firstly you will need to clone this repository by running the
git clone <project's Github URL>
command. - After you've done that you'll need to make sure that you have npm installed. Link npm package serve
- The project will now run locally.
- Make changes to the code and if you think it belongs in here then just submit a pull request.
- The information used to create this site was from a number of sources
- The FBI API used to extract the data charted was obtained from: Crime Data Explorer