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

municipalities updates with data from ANPR #7

Merged
merged 2 commits into from Nov 12, 2019

Conversation

guglielmo
Copy link
Contributor

@guglielmo guglielmo commented Nov 11, 2019

Data taken from the ANPR web site are integrated into the _MUNICIPALITIES data structure, to take into account more codes, especially of ancient and expired locations.
Also, this is up to date as of November 2019.

This is useful when trying to compute fiscal codes for historical persons.

@fabiocaccamo
Copy link
Owner

Hi @guglielmo, thank you very much for this PR.
I checked the data and there are multiple entries for the same code and municipality name.
When the data is indexed the latest value would override the previous ones. This could cause some unexpected behavior that should be tested better before release a new version.

@fabiocaccamo fabiocaccamo merged commit 6c52002 into fabiocaccamo:master Nov 12, 2019
@fabiocaccamo
Copy link
Owner

fabiocaccamo commented Nov 15, 2019

Hi @guglielmo , I looked better the data, the same municipality code sometimes is listed multiple times, this occurs when a municipality changed province or has been suppressed.

The information you added are useful, but are not enough to write a better algorithm.

To improve encoding/decoding accuracy to a next level we should know the last year of validity for each obsolete municipality. Only having this information it will be possible to encode/encode correctly all old codes.

The result should be something like this:

# ...
{ "code": "A072", "province": "AL", "name": "AGLIANO (soppresso)", "valid_until": 1964 },
{ "code": "A072", "province": "AT", "name": "AGLIANO (soppresso)", "valid_until": 1983 },
{ "code": "A072", "province": "AT", "name": "AGLIANO TERME" },
# ...

Do you think you could obtain and add this information?

@fabiocaccamo
Copy link
Owner

Could you also link your data-source please?

@guglielmo
Copy link
Contributor Author

Hi @fabiocaccamo, the source is: https://www.anpr.interno.it/portale/anpr-archivio-comuni.csv
There are many information there and each record has a start and end date. So, you could write a valid_from and valid_until with very specific dates.

@guglielmo
Copy link
Contributor Author

I see that the PR was merged and it is now in master. Is it going to be published to PyPi?

@fabiocaccamo
Copy link
Owner

fabiocaccamo commented Nov 15, 2019

You can update to 0.3.6 version.

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

Successfully merging this pull request may close these issues.

None yet

2 participants