Skip to content

A GIS based REST API built with Django, Docker, Nginx, Django Rest Framework and more.... ๐Ÿ ๐Ÿ”ฅ

License

Notifications You must be signed in to change notification settings

API-Imperfect/geodjango-hospitals-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Intro to spatial and non Spatial Queries

Twitter: AlphaOmondi

๐Ÿ‘‹ Intro series on Spatial querying with Geodjango and Django REST Framework.

Run the Application

git clone https://github.com/API-Imperfect/geodjango-hospitals-api
cd geodjango-hospitals-api
 - run the command: make build
 - run the migrate command: make migrate
 - create superuser: make superuser
 - then run the command: make shell
to load hospital data run these commands in the shell
>>> from hospitals import load
>>> load.run()

to load boundaries data run these commands
>>> from boundaries import load
>>> load.run()
>>> quit()

๐Ÿƒ๐Ÿฝโ€โ™‚๏ธ API Requests
Open Postman and make the following get requests
GET http://localhost:8080/api/v1/hospitals/
GET http://localhost:8080/api/v1/boundaries/
GET http://localhost:8080/api/v1/hospitals/?province=1
GET http://localhost:8080/api/v1/hospitals/closest_hospitals/?lon=30.094388&lat=-1.943566
GET http://localhost:8080/api/v1/hospitals/total_bed_capacity/
GET http://localhost:8080/api/v1/hospitals/province_beds_capacity/

License

MIT

About

A GIS based REST API built with Django, Docker, Nginx, Django Rest Framework and more.... ๐Ÿ ๐Ÿ”ฅ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published