Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

County Code for Naples is NA #73

Open
AlessandroLorenzi opened this issue May 4, 2023 · 3 comments
Open

County Code for Naples is NA #73

AlessandroLorenzi opened this issue May 4, 2023 · 3 comments

Comments

@AlessandroLorenzi
Copy link
Contributor

Hi,

This is the data fetched from pgocode for 80030 postal code:

postal_code                                                   80030
country_code                                                     IT
place_name        Spartimento, Gallo, Cimitile, Carbonara Di Nol...
state_name                                                 Campania
state_code                                                        4
county_name                                                  Napoli
county_code                                                     NaN
community_name                                                  NaN
community_code                                                  NaN
latitude                                                  40.926694
longitude                                                 14.520376
accuracy                                                        4.0

This is the raw from GeoNames:

IT      80030   Spartimento     Campania        04      Napoli  NA                      40.891  14.4724 4
IT      80030   Gallo   Campania        04      Napoli  NA                      40.9424 14.5455 4
IT      80030   Cimitile        Campania        04      Napoli  NA                      40.9423 14.5256 4
IT      80030   Carbonara Di Nola       Campania        04      Napoli  NA                      40.8744 14.5788 4
IT      80030   Camposano       Campania        04      Napoli  NA                      40.9524 14.5299 4
IT      80030   San Vitaliano   Campania        04      Napoli  NA                      40.9244 14.4746 4
IT      80030   Castello Di Cisterna    Campania        04      Napoli  NA                      40.9159 14.4112 4
IT      80030   Mariglianella   Campania        04      Napoli  NA                      40.9296 14.437  4
IT      80030   Visciano        Campania        04      Napoli  NA                      40.9238 14.5824 4
IT      80030   Tufino  Campania        04      Napoli  NA                      40.9559 14.5657 4
IT      80030   Liveri  Campania        04      Napoli  NA                      40.9041 14.5654 4
IT      80030   San Paolo Bel Sito      Campania        04      Napoli  NA                      40.9135 14.5486 4
IT      80030   Comiziano       Campania        04      Napoli  NA                      40.9516 14.5512 4
IT      80030   Scisciano       Campania        04      Napoli  NA                      40.9066 14.4745 4
IT      80030   Roccarainola    Campania        04      Napoli  NA                      40.9725 14.5428 4
IT      80030   Schiava Campania        04      Napoli  NA                      40.9267 14.5204 3
IT      80030   Gargani Campania        04      Napoli  NA                      40.9267 14.5204 3

The data from GeoNames dataset is correct, I assume that the library is misinterpreting NA as NaN.

AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
@AlessandroLorenzi
Copy link
Contributor Author

update: in the csv "NA" is missing!

        data_path = os.path.join(STORAGE_DIR, country.upper() + ".txt")
        if os.path.exists(data_path):
            data = pd.read_csv(
                data_path, dtype={"postal_code": str}, na_values=NA_VALUES
            )
# grep 80023 ~/.cache/pgeocode/IT.tx
IT,80023,Caivano,Campania,4,Napoli,,,,40.9575,14.3059,4.0
IT,80023,Pascarola,Campania,4,Napoli,,,,40.9764,14.305,4.0

AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
AlessandroLorenzi added a commit to AlessandroLorenzi/pgeocode that referenced this issue May 4, 2023
rth pushed a commit that referenced this issue May 7, 2023
@AlessandroLorenzi
Copy link
Contributor Author

hi @rth could you do a release? this feature is still not in latest version published

@rth
Copy link
Member

rth commented Sep 7, 2023

It's released now @AlessandroLorenzi thanks for the reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants