Giter VIP home page Giter VIP logo

Comments (12)

pallupz avatar pallupz commented on September 1, 2024

Adding a beginning date input would be super easy.

I skipped it for primarily two reasons:

  • In my experience, slots after next one week are usually not open and if it is, it's usually not too hard to get those.
  • When I made this for my personal use, I was trying to get a slot at the earliest.

Nonetheless, it's good idea. Will try to implement it some time.

from covid-vaccine-booking.

mrms123 avatar mrms123 commented on September 1, 2024

@pallupz I'm not very good at GitHub - but I've made changes to the code to check for min_age criterion while booking (to accommodate 18+ bookings, and match only to centers accepting 18 plus). Can you walk me through how to submit it as a PR?

from covid-vaccine-booking.

pallupz avatar pallupz commented on September 1, 2024

I haven't used Github for public projects before either. Are you able to create a branch? If yes, you can make the changes and create a pull request.

from covid-vaccine-booking.

mrms123 avatar mrms123 commented on September 1, 2024

Figured it out.
I need to fork it, make a branch on my end, then push to it, and raise a PR. Did that.

PS : I couldn't get PyInstaller to run - so the exe isn't updated yet

from covid-vaccine-booking.

mrms123 avatar mrms123 commented on September 1, 2024

Btw - any reason why you are doing all the filtering etc as a dict? Any advantages over a DF?
I found it a bit slow the first time when I was trying locations with large availability (try Delhi State and Central Delhi District)

from covid-vaccine-booking.

pallupz avatar pallupz commented on September 1, 2024

I have updated the exe.

Just using list of dict comprehension because its simple. There isn't enough data/filtering to justify bringing in another package, like say Pandas, and its sub-dependencies.

Also, slowness is probably due to the delay in getting a response from the Co-WIN API.

from covid-vaccine-booking.

pallupz avatar pallupz commented on September 1, 2024

I looked into the slowness in areas with large availability - and you were right, the issue was in code. I have fixed it. Thank you for highlighting it.

from covid-vaccine-booking.

mrms123 avatar mrms123 commented on September 1, 2024

Thanks for looking into this - it has definitely sped up.
I could see the JSON being generated - and could narrow it down to the display function - but couldn't get further on it (my python skills are fairly limited - more towards data wrangling).

I was looking at taking location as an input, and sorting vaccination centers by distance. After making all the code changes, it turns out that somehow the API response that is coming in is providing the latitude and longitude of the vaccination center as an int - defeats the purpose largely.

But on API Setu, the sample response has the decimals for the lat long. Do you think this is an eccentricity of the requests package / python? Or is it a flaw in the API response itself? I tried playing around with Postman, but couldn't get it to work, to see the actual response.

from covid-vaccine-booking.

pallupz avatar pallupz commented on September 1, 2024

The issue is not with Python. Although API documentation says it would return a float, its actually giving an int. You can use Network tab in Developer Mode in the browser (F12) to see the response, like below:
image

from covid-vaccine-booking.

pallupz avatar pallupz commented on September 1, 2024

I thought of doing that kind of sorting using pincodes and some API to get the distance between pincodes. Couldn't find any free APIs that would give that info.

from covid-vaccine-booking.

mrms123 avatar mrms123 commented on September 1, 2024

Thanks for the PIN Code idea.. Turns out, it was quite simple. I found a dataset online, that mapped Pin Codes to Lat Longs. So used that to plug in the center lat longs. I have also left in an if condition, so that in case they ever correct the response to floats, then it will start picking those instead.

Still not able to get pyinstaller to run. Also, with pyinstaller, you might need to change the data source to directly pulling from github or something, for the pin code map

from covid-vaccine-booking.

pallupz avatar pallupz commented on September 1, 2024

I too had tried geocodes. To verify that it has the correct coordinates against the pincodes, I tried looking up for pincodes in my area. Found that most locations were off by kilometers.

Are they displaying the locations correctly for you?

from covid-vaccine-booking.

Related Issues (20)

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.