joke2k / faker

Faker is a Python package that generates fake data for you.
https://faker.readthedocs.io
MIT License
17.83k stars 1.93k forks source link

dk_DK output is wrong. #1151

Closed bsdis closed 3 years ago

bsdis commented 4 years ago

Almost all providers for dk_DK output wrong data. I have attached a list which will make it possible to correct this issue.

Sorry about this danish descriptions, i could not find english versions - possibly use google translator to read.

Thanks

#### fake.address() ####
Description: 
https://www.postnord.dk/sende/praktik/udformningafbreve/adressering
https://danmarksadresser.dk/regler-og-vejledning/

Data of street names in denmark
http://dawa.aws.dk/vejstykker?format=json
(csv and json)

Current output:
'36192 Carlo Plains\nNew Samhaven, DC 76441'

Real format:
Streetname streetnumber
zipcode cityname

Correct Example:
Kastanjevej 38
2832 Solvang

#### fake.building_number() ####
Description: Looks ok, but never prepend zeros.
Numbers don’t go higher than 1000

Current output:
'02650'

Real format:
xxxx

Correct Example:
123

#### fake.city() ####
Description:
See https://pastebin.com/NcLj96e7 for a pretty and 
easily accessible list of zipcode => city. (Here is an
alternative: http://www.nr.dk/danmark.html )
Current output does not look danish at all, however 
format is ok

Current output:
'Marianneview'

Real format:
Cityname

Correct Example:
Kalundborg

#### fake.city_prefix() ####
We dont have city-prefix in Denmark

#### fake.city_suffix() ####
# 'land'
We dont have city-suffix in Denmark

fake.country()
# 'Turks and Caicos Islands'
Description: Wrong country names

See a complete list of correct names here:
https://paste.ubuntu.com/p/MCgfvMSgzy/

fake.country_code(representation='alpha-2')
# 'TT'
# Looks correct

fake.military_apo()
# 'PSC 0683, Box 2308'
We dont have that in Denmark

fake.military_dpo()
# 'Unit 2847 Box 2875'
We dont have that in Denmark

fake.military_ship()
# 'USCGC'
We dont have that in Denmark

fake.military_state()
# 'AA'
Not sure what this is

fake.postalcode()
# '42407'
Should be in the format 
####, minimum number is 1000. 
See https://pastebin.com/NcLj96e7 for a complete 
list

fake.postalcode_in_state(state_abbr=None)
# '87238'
We don’t have this in Denmark

fake.postalcode_plus4()
# '32765-7452'
Not sure about this

fake.postcode()
# '89418'
See fake.postalcode()

fake.postcode_in_state(state_abbr=None)
# '73182'
We don’t have this in Denmark

fake.secondary_address()
# 'Apt. 687'
Not sure about this

fake.state()
# 'Alabama'
There are no states in Denmark

fake.state_abbr(include_territories=True)
# 'NM'
There are no states in Denmark

fake.street_address()
# '537 Frandsen Path Suite 609'
See https://www.postnord.dk/sende/praktik/udformningafbreve/
for correct format

fake.street_name()
# 'Jeppesen Well'
See https://www.postnord.dk/sende/praktik/udformningafbreve/
for correct format

fake.street_suffix()
# 'Locks'
We don’t have this in Denmark

fake.zipcode()
# '46840'
See https://pastebin.com/NcLj96e7 for a complete list

fake.zipcode_in_state(state_abbr=None)
# '73129'
There are no states in Denmark

fake.zipcode_plus4()
# '60581-2946'
Not sure about this
fcurella commented 4 years ago

Hi @bsdis !

The issue is that we don't have an address provider for dk_DK at all, and so it's falling back to en_US: https://github.com/joke2k/faker/tree/master/faker/providers/address

Feel free to contribute one :) The easiest way is to copy one of the existing ones and make modifications.

bsdis commented 4 years ago

Allright, that makes sense. I will look into creating a danish provider :)

michjnich commented 4 years ago

@bsdis The Swedish one is decent enough and should be close enough to the Danish format to copy with minimal changes ...

JoseNavy commented 3 years ago

Is this issue still active? I didn't find any provider for dk_DK and would like to help!