Mixed date format COVID-19 Cases by Location (as of 26/05/2020)

The COVID-19 Cases by Location dataset has mixed date formats.

Normally the format is YYYY-MM-DD.
However, whenever the day of the month is between 1 and 12, the date format switches to YYYY-DD-MM.

3 Likes

Yes I noticed this just now too. Really frustrating if you want to view the latest statistics.

Yes I absolutely agree. YYYY-MM-DD is ISO standard. How it started is the correct method.

This appears to be resolved in the data as updated 27/05/2020.

Same issue again image

Yep, I’m seeing the issue again too. :frowning:

Data in the CSV looks OK:

12/03/2020,2024,X720,South Eastern Sydney,18050,Waverley (A)
12/03/2020,2566,X710,South Western Sydney,11500,Campbelltown (C) (NSW)
12/03/2020,2570,X710,South Western Sydney,11450,Camden (A)

The problem appears to be a way CKAN formats the dates on the back-end as the problem occurs viewing the API directly: https://data.nsw.gov.au/data/api/3/action/datastore_search?resource_id=21304414-1ff1-4243-a5d2-f52778048b29&limit=3110

{
    "notification_date": "2020-12-03",
    "postcode": 2024,
    "lhd_2010_code": "X720",
    "lhd_2010_name": "South Eastern Sydney",
    "lga_code19": 18050,
    "lga_name19": "Waverley (A)"
  },
  {
    "notification_date": "2020-12-03",
    "postcode": 2566,
    "lhd_2010_code": "X710",
    "lhd_2010_name": "South Western Sydney",
    "lga_code19": 11500,
    "lga_name19": "Campbelltown (C) (NSW)"
  },
  {
    "notification_date": "2020-12-03",
    "postcode": 2570,
    "lhd_2010_code": "X710",
    "lhd_2010_name": "South Western Sydney",
    "lga_code19": 11450,
    "lga_name19": "Camden (A)"
  },

It could be caused by CKAN getting confused when interpreting the DD/MM/YYYY into YYYY-MM-DD. You could test by having the input data as DDDD-MM-YY.

Surely there must be a flag of some sort when the upload is being done that is behind this? Or there’s a part of the upload process that’s being overlooked every now and again. Given that it has occurred several times in the last few months, but generally there is no issue, CKAN itself is not the problem. Something is going wrong as the upload is being done and there’s no error check until someone using the API looks at the resulting output.

This is still a problem with JSON and CSV data!

© Data.NSW