How do I use geocode in python to convert singapore's postal code into lat lng?How do I copy a file in Python?How can I safely create a nested directory in Python?How do I parse a string to a float or int in Python?How to get the current time in PythonHow can I make a time delay in Python?Converting integer to string in Python?How do I get the number of elements in a list in Python?How do I concatenate two lists in Python?How do I lowercase a string in Python?How do I import a .csv file with a column of coordinates for polygons to a geodataframe?

Simulate Bitwise Cyclic Tag

How can the DM most effectively choose 1 out of an odd number of players to be targeted by an attack or effect?

Why is this code 6.5x slower with optimizations enabled?

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

Why was the small council so happy for Tyrion to become the Master of Coin?

Is it possible to do 50 km distance without any previous training?

What are these boxed doors outside store fronts in New York?

Is there really no realistic way for a skeleton monster to move around without magic?

What is the meaning of "of trouble" in the following sentence?

Are tax years 2016 & 2017 back taxes deductible for tax year 2018?

Email Account under attack (really) - anything I can do?

Finding files for which a command fails

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

"which" command doesn't work / path of Safari?

Motorized valve interfering with button?

How to use Pandas to get the count of every combination inclusive

Does the radius of the Spirit Guardians spell depend on the size of the caster?

Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).

Can Medicine checks be used, with decent rolls, to completely mitigate the risk of death from ongoing damage?

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

If Manufacturer spice model and Datasheet give different values which should I use?

Can I make popcorn with any corn?

Non-Jewish family in an Orthodox Jewish Wedding

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?



How do I use geocode in python to convert singapore's postal code into lat lng?


How do I copy a file in Python?How can I safely create a nested directory in Python?How do I parse a string to a float or int in Python?How to get the current time in PythonHow can I make a time delay in Python?Converting integer to string in Python?How do I get the number of elements in a list in Python?How do I concatenate two lists in Python?How do I lowercase a string in Python?How do I import a .csv file with a column of coordinates for polygons to a geodataframe?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I need help. This is my first coding GIS in python. So my task is to convert this postal codes that are from singapore into lat n lng coordinates before passing them into the geometry column of a geodataframe. But I am having trouble converting the postal codes to lat lng coordinates and I am not exactly sure what's the problem.
=======================================================================#



 Postal_Code

0 237978

1 731678

2 259727

3 569922

4 470632


Convert to lat lng method ( obtained from @Miguel2488 on Stacks )



import csv

import geocoder

import geopandas as gpd

import pandas as pd

df = pd.read_csv("My File name")

saved_column = df.Postal_Code

saved_column.head()



lat_lng_coords = None

while(lat_lng_coords is None):

g = geocoder.google(', Singapore'.format(saved_column))

lat_lng_coords = g.latlng

latitude = lat_lng_coords[0]

longitude = lat_lng_coords[1]

print(latitude, longitude)









share|improve this question






















  • Where is your code for making http request to google geocoding API? See Geocoding API developer guide.

    – hcheung
    Mar 8 at 6:37











  • “Having trouble” isn’t a problem description that is possible to solve. You need to be specific about what the problem with your code is for example given a certain input, what output does it give, and what were you expecting. Be specific.

    – barny
    Mar 8 at 8:15

















2















I need help. This is my first coding GIS in python. So my task is to convert this postal codes that are from singapore into lat n lng coordinates before passing them into the geometry column of a geodataframe. But I am having trouble converting the postal codes to lat lng coordinates and I am not exactly sure what's the problem.
=======================================================================#



 Postal_Code

0 237978

1 731678

2 259727

3 569922

4 470632


Convert to lat lng method ( obtained from @Miguel2488 on Stacks )



import csv

import geocoder

import geopandas as gpd

import pandas as pd

df = pd.read_csv("My File name")

saved_column = df.Postal_Code

saved_column.head()



lat_lng_coords = None

while(lat_lng_coords is None):

g = geocoder.google(', Singapore'.format(saved_column))

lat_lng_coords = g.latlng

latitude = lat_lng_coords[0]

longitude = lat_lng_coords[1]

print(latitude, longitude)









share|improve this question






















  • Where is your code for making http request to google geocoding API? See Geocoding API developer guide.

    – hcheung
    Mar 8 at 6:37











  • “Having trouble” isn’t a problem description that is possible to solve. You need to be specific about what the problem with your code is for example given a certain input, what output does it give, and what were you expecting. Be specific.

    – barny
    Mar 8 at 8:15













2












2








2








I need help. This is my first coding GIS in python. So my task is to convert this postal codes that are from singapore into lat n lng coordinates before passing them into the geometry column of a geodataframe. But I am having trouble converting the postal codes to lat lng coordinates and I am not exactly sure what's the problem.
=======================================================================#



 Postal_Code

0 237978

1 731678

2 259727

3 569922

4 470632


Convert to lat lng method ( obtained from @Miguel2488 on Stacks )



import csv

import geocoder

import geopandas as gpd

import pandas as pd

df = pd.read_csv("My File name")

saved_column = df.Postal_Code

saved_column.head()



lat_lng_coords = None

while(lat_lng_coords is None):

g = geocoder.google(', Singapore'.format(saved_column))

lat_lng_coords = g.latlng

latitude = lat_lng_coords[0]

longitude = lat_lng_coords[1]

print(latitude, longitude)









share|improve this question














I need help. This is my first coding GIS in python. So my task is to convert this postal codes that are from singapore into lat n lng coordinates before passing them into the geometry column of a geodataframe. But I am having trouble converting the postal codes to lat lng coordinates and I am not exactly sure what's the problem.
=======================================================================#



 Postal_Code

0 237978

1 731678

2 259727

3 569922

4 470632


Convert to lat lng method ( obtained from @Miguel2488 on Stacks )



import csv

import geocoder

import geopandas as gpd

import pandas as pd

df = pd.read_csv("My File name")

saved_column = df.Postal_Code

saved_column.head()



lat_lng_coords = None

while(lat_lng_coords is None):

g = geocoder.google(', Singapore'.format(saved_column))

lat_lng_coords = g.latlng

latitude = lat_lng_coords[0]

longitude = lat_lng_coords[1]

print(latitude, longitude)






python gis geocoding






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 6:14









FelFel

111




111












  • Where is your code for making http request to google geocoding API? See Geocoding API developer guide.

    – hcheung
    Mar 8 at 6:37











  • “Having trouble” isn’t a problem description that is possible to solve. You need to be specific about what the problem with your code is for example given a certain input, what output does it give, and what were you expecting. Be specific.

    – barny
    Mar 8 at 8:15

















  • Where is your code for making http request to google geocoding API? See Geocoding API developer guide.

    – hcheung
    Mar 8 at 6:37











  • “Having trouble” isn’t a problem description that is possible to solve. You need to be specific about what the problem with your code is for example given a certain input, what output does it give, and what were you expecting. Be specific.

    – barny
    Mar 8 at 8:15
















Where is your code for making http request to google geocoding API? See Geocoding API developer guide.

– hcheung
Mar 8 at 6:37





Where is your code for making http request to google geocoding API? See Geocoding API developer guide.

– hcheung
Mar 8 at 6:37













“Having trouble” isn’t a problem description that is possible to solve. You need to be specific about what the problem with your code is for example given a certain input, what output does it give, and what were you expecting. Be specific.

– barny
Mar 8 at 8:15





“Having trouble” isn’t a problem description that is possible to solve. You need to be specific about what the problem with your code is for example given a certain input, what output does it give, and what were you expecting. Be specific.

– barny
Mar 8 at 8:15












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057698%2fhow-do-i-use-geocode-in-python-to-convert-singapores-postal-code-into-lat-lng%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057698%2fhow-do-i-use-geocode-in-python-to-convert-singapores-postal-code-into-lat-lng%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко