Skip to content

Unexpected "Could not find first good line start after jump point 1 when sampling" #2134

Description

@MichaelChirico

Using this data set (download link here), the second line looks corrupted:

Address,Type,Datetime,Latitude,Longitude,Report Location,Incident Number
, --T::00, ,,,,
6900 37th Av S,Medic Response,11/09/2011 11:33:00 PM +0000,47.540683,-122.286131,"(47.540683, -122.286131)",F110104166
N 50th St / Stone Way N,Aid Response,11/09/2011 11:32:00 PM +0000,47.665034,-122.340207,"(47.665034, -122.340207)",F110104164
E John St / E Olive Way,Aid Response,11/09/2011 11:32:00 PM +0000,47.619575,-122.324257,"(47.619575, -122.324257)",F110104165

So even though plain fread works fine:

fread('Seattle_Real_Time_Fire_911_Calls.csv')
#                         Address                       Type                     Datetime Latitude Longitude
#      1:                                            --T::00                                    NA        NA
#      2:          6900 37th Av S             Medic Response 11/09/2011 11:33:00 PM +0000 47.54068 -122.2861
#      3: N 50th St / Stone Way N               Aid Response 11/09/2011 11:32:00 PM +0000 47.66503 -122.3402
#      4: E John St / E Olive Way               Aid Response 11/09/2011 11:32:00 PM +0000 47.61957 -122.3243
#      5:           611 12th Av S               Aid Response 11/09/2011 11:29:00 PM +0000 47.59741 -122.3172
#     ---                                                                                                   
# 606464:       14005 Aurora Av N               Aid Response 04/28/2017 12:04:00 PM +0000 47.73051 -122.3451
# 606465:           1334 Terry Av             Medic Response 04/28/2017 07:19:00 AM +0000 47.61135 -122.3285
# 606466:        13326 20th Av Ne               Aid Response 04/28/2017 07:23:00 AM +0000 47.72502 -122.3073
# 606467:        318 2nd Av Et  S Medic Response- 7 per Rule 04/28/2017 08:00:00 AM +0000 47.60019 -122.3305
# 606468:  7136 Fauntleroy Way Sw               Aid Response 04/28/2017 10:51:00 AM +0000 47.53933 -122.3909
#                  Report Location Incident Number
#      1:                                         
#      2: (47.540683, -122.286131)      F110104166
#      3: (47.665034, -122.340207)      F110104164
#      4: (47.619575, -122.324257)      F110104165
#      5: (47.597406, -122.317228)      F110104162
#     ---                                         
# 606464: (47.730514, -122.345057)      F170041131
# 606465: (47.611348, -122.328514)      F170041054
# 606466: (47.725022, -122.307276)      F170041056
# 606467: (47.600194, -122.330541)      F170041061
# 606468:  (47.53933, -122.390857)      F170041105

If I try to skip the troublesome line I get an error:

coln = c('address', 'type', 'datetime', 'latitude',
         'longitude', 'latlon', 'incident_no')
nine11 = fread('Seattle_Real_Time_Fire_911_Calls.csv', skip = 2L,
               header = FALSE, col.names = coln)

Error in fread("Seattle_Real_Time_Fire_911_Calls.csv", skip = 2L, header = FALSE, :
Could not find first good line start after jump point 1 when sampling.

Unclear why fread would fail here...

Activity

  1. st-pasha commented on Dec 11, 2017

    @st-pasha
    Contributor

    Works in the latest version of data.table.

  2. MichaelChirico commented on Dec 12, 2017

    @MichaelChirico
    MemberAuthor

    @st-pasha indeed! Though the file has changed since then -- there's an off chance something in the file itself was fixed. My fault for not pointing to a static example.

    The culprit lines still look troublesome, anyway:

    Address,Type,Datetime,Latitude,Longitude,Report Location,Incident Number
    , --T::00, ,,,,
    6900 37th Av S,Medic Response,11/09/2011 11:33:00 PM +0000,47.540683,-122.286131,"(47.540683, -122.286131)",F110104166
    

    So I'm willing to close this as it does indeed appear to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions