hello Ranga,

Thank you very much posting very useful direction and all the respective
pointers. I really appreciate it.

This is what we tried so far, but we are seeing an error from our
execution. Could you please let us know what we are missing?

import pgeocode
import folium

def zipcode_to_map(country_code, postal_code):

country_code = pgeocode.Nominatim(country_code)

zip_code = country_code.query_postal_code(postal_code)

postal_code = zip_code['postal_code']

multiple_zip_codes = country_code.query_postal_code(["560034", "560083"])

m = folium.Map(location=[zip_code['latitude'], zip_code['longitude']],
zoom_start=9, detect_retina=True, control_scale=False)
m.save(f'{postal_code}-map.html') print(m) zipcode_to_map('in','515411')

Result is here >>

python sam.py
<folium.folium.Map object at 0x0000020675490E48>

Thanks,
~Ram


On Thu, Jun 4, 2020 at 9:24 AM RANGA BHARATH JINKA <bharathjink...@gmail.com>
wrote:

> You can refer these links.
>
>
> https://towardsdatascience.com/visualizing-data-at-the-zip-code-level-with-folium-d07ac983db20
>
> https://morioh.com/p/d896544d6977
>
> https://towardsdatascience.com/making-3-easy-maps-with-python-fb7dfb1036
>
> On Thursday, June 4, 2020 at 3:15:55 AM UTC+5:30, Ram wrote:
>>
>> Hi,
>>
>> We need to add location map based on the zip code in our DJango web
>> application. Is there any free API available out there? if you have used it
>> already could you suggest one?
>>
>> Thanks,
>> ~Ram
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/78804b7c-c0c4-4258-bafb-809aa349f4b9%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/78804b7c-c0c4-4258-bafb-809aa349f4b9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BOi5F3h%3DigcwBi-fhqjRaDggkMz75d7UWbeKawfjR%3DQfdDTPg%40mail.gmail.com.

Reply via email to