Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

fix missing data / warnings in columns for ukp_crime #11

Closed
njtierney opened this issue Oct 30, 2016 · 2 comments
Closed

fix missing data / warnings in columns for ukp_crime #11

njtierney opened this issue Oct 30, 2016 · 2 comments

Comments

@njtierney
Copy link
Owner

njtierney commented Oct 30, 2016

OK so at the moment, when I run a test to find the crime near a location, I get a dataset out, but it's missing data for things like context and location_subtype etc.

Also, there's a butt ton of warnings, need to fix that.

library(ukpolice)
ukp_crime(lat = 52.629729, lng = -1.131592)
#> No encoding supplied: defaulting to UTF-8.
#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character

#> Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character
#> # A tibble: 1,386 × 13
#>                 category context       id location_subtype location_type
#>                    <chr>   <chr>    <chr>            <chr>         <chr>
#> 1  anti-social-behaviour         50559804                          Force
#> 2  anti-social-behaviour         50565912                          Force
#> 3  anti-social-behaviour         50562730                          Force
#> 4  anti-social-behaviour         50562692                          Force
#> 5  anti-social-behaviour         50562689                          Force
#> 6  anti-social-behaviour         50562680                          Force
#> 7  anti-social-behaviour         50565899                          Force
#> 8  anti-social-behaviour         50559811                          Force
#> 9  anti-social-behaviour         50559816                          Force
#> 10 anti-social-behaviour         50562670                          Force
#> # ... with 1,376 more rows, and 8 more variables: latitude <chr>,
#> #   longitude <chr>, street_id <chr>, street_name <chr>, date <chr>,
#> #   persistent_id <chr>, outcome_category <chr>, outcome_date <chr>
@njtierney njtierney changed the title fix missing data / warnings in columns for ukp_crime_stree_point fix missing data / warnings in columns for ukp_crime Nov 5, 2016
@njtierney
Copy link
Owner Author

The warnings have been fixed in commit 307ac32 by setting stringsAsFactors = FALSE.

@njtierney
Copy link
Owner Author

A new issue will be opened for dealing with the absent columns

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

No branches or pull requests

1 participant