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

fix missing data / warnings in columns for `ukp_crime` #11

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

Comments

Projects
None yet
1 participant
@njtierney
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 from fix missing data / warnings in columns for ukp_crime_stree_point to fix missing data / warnings in columns for `ukp_crime` Nov 5, 2016

@njtierney

This comment has been minimized.

Owner

njtierney commented Nov 5, 2016

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

@njtierney

This comment has been minimized.

Owner

njtierney commented Nov 5, 2016

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

@njtierney njtierney closed this Nov 5, 2016

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