Giter Club home page Giter Club logo

areabase's People

Contributors

flamparski avatar

Watchers

 avatar  avatar

areabase's Issues

Confusing error message when the Postcode API 404's

The handler for most messages still uses a default, clunky message.

  • A special case should be added for the Postcode API 404 errors to display the message:
    "It seems you are outside the UK or too far away from a postcode point."

Show a breakdown of the type of crimes that were committed in a given area

Feature summary

The user has requested a breakdown of the crimes that were reported to the Police in a given area.

Design notes

  • The requested feature is not specific enough yet - more info needed

Proposed design

  • The breakdown will be shown as a pie chart on the Crime tab of Areabase, where data aggregated from last year will be shown.
    • Could also be shown as time series if possible

Implementation notes

Show a breakdown of how the police dealt with crimes in the area

Feature summary

The user has requested a breakdown of how crimes were dealt with by the police in a given area

Design notes

  • The requested feature is not specific enough yet - more info needed

Proposed design

  • The breakdown will be shown as a pie chart on the Crime tab of Areabase, where data aggregated from last year will be shown.

    • Could also be shown as time series if possible
  • A Summary Card may be shown, or this may be a piece of text on the Crime tab

    Out of 289 reported incidents, 205 were resolved successfully.

Implementation notes

Map does not re-centre on orientation changes

The OpenSpace map does not re-centre properly on device orientation changes -- on first orientation change, the map returns to being an overview of the whole of the UK, on subsequent orientation changes it re-centers on the required coordinates.

Test the ONS Delivery API

The calls GetTables and GetChildAreaTables need more extensive testing, and so does the returned List of Datasets.

Create a navigation drawer for the app

The app should consist of the following pages:

  • Summary, which uses CardsUI, OS Map View, NeSS and Police API adapters
    • Indices, which uses NeSS adapters
  • Demographics, which uses NeSS adapters
  • Economy, which uses NeSS adapters
    • Deprivation
    • Development
    • Work
  • Education, which uses NeSS adapters
  • Crime, which uses NeSS and Police API adapters
  • Environment, which uses NeSS adapters
  • Hierarchy, which uses NeSS adapters and OS Map View
  • Misc, which uses NeSS and Police API adapters and OS Map View

Note that some of these may drop or gain adapters and components.

Create some sort of a test program?

In order to fully complete #7 and #8, a test program may be required -- might be SWT-based (as it is now), or just a simple console application to display things.

Fix the print stylesheets for the web page

Since I want to use the webpage at http://flamparski.github.io/areabase as the user manual, I need to get it ready to print and display some index stuff. Quite possibly I will just have to copy it into Publisher or something like that and just print it from there.

Because TRWTF are AQA: mark computing coursework from a paper-only code distribution.

Changes that need to be done:

  • Reduce the code font size a bit (but try to keep http://flamparski.github.io/areabase/prettycode.html at 500 pages because why not)
  • Print layout for the main page (?):
    • Use columns for printing to not make the images take up two bloody pages
    • Set body { background-color: #FFFFFF; } and then a slightly darker grey for the .jumbotron-section elements

Redesign how the Economy card works (and how to calculate AreaRank based on the economy)

After getting the search functionality to work in ba479bf, I've noticed that many areas don't have the required dataset for model-based income estimates; but they do contain many benefits-related information that can be used to forecast the economy.

Possible approach: instead of using mean income as a key economic variable, focus on unemployment rate, and take into account benefits such as jobseeker's allowance and income support (under the assumption that the economy is going down as the number of claimants increases).

NullPointerException when processing the summary data for Economy

Seems like the value of largestEconomySector is not always set: investigate

LogCat:

01-16 14:25:26.282: I/System.out(30647): Calling: http://neighbourhood.statistics.gov.uk/NDE2/Disco/GetDatasets?SubjectId=4&AreaId=6275998
01-16 14:25:27.343: I/System.out(30647): Calling: http://neighbourhood.statistics.gov.uk/NDE2/Deli/getTables?Areas=6275998&Datasets=266,2484,2513
01-16 14:25:29.516: E/AreaDataService(30647): Error processing card for Economy: NullPointerException
01-16 14:25:29.516: E/AreaDataService(30647): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
01-16 14:25:29.516: E/AreaDataService(30647):   at lamparski.areabase.cardproviders.EconomyCardProvider.getBiggestEconomySector(EconomyCardProvider.java:91)
01-16 14:25:29.516: E/AreaDataService(30647):   at lamparski.areabase.cardproviders.EconomyCardProvider.economyCardForArea(EconomyCardProvider.java:60)
01-16 14:25:29.516: E/AreaDataService(30647):   at lamparski.areabase.services.AreaDataService$1.doInBackground(AreaDataService.java:131)
01-16 14:25:29.516: E/AreaDataService(30647):   at lamparski.areabase.services.AreaDataService$1.doInBackground(AreaDataService.java:1)
01-16 14:25:29.516: E/AreaDataService(30647):   at android.os.AsyncTask$2.call(AsyncTask.java:288)
01-16 14:25:29.516: E/AreaDataService(30647):   at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-16 14:25:29.516: E/AreaDataService(30647):   at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
01-16 14:25:29.516: E/AreaDataService(30647):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-16 14:25:29.516: E/AreaDataService(30647):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-16 14:25:29.516: E/AreaDataService(30647):   at java.lang.Thread.run(Thread.java:811)
01-16 14:25:29.516: E/SummaryFragment(30647): Error processing NDE data
01-16 14:25:29.516: E/SummaryFragment(30647): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
01-16 14:25:29.516: E/SummaryFragment(30647):   at lamparski.areabase.cardproviders.EconomyCardProvider.getBiggestEconomySector(EconomyCardProvider.java:91)
01-16 14:25:29.516: E/SummaryFragment(30647):   at lamparski.areabase.cardproviders.EconomyCardProvider.economyCardForArea(EconomyCardProvider.java:60)
01-16 14:25:29.516: E/SummaryFragment(30647):   at lamparski.areabase.services.AreaDataService$1.doInBackground(AreaDataService.java:131)
01-16 14:25:29.516: E/SummaryFragment(30647):   at lamparski.areabase.services.AreaDataService$1.doInBackground(AreaDataService.java:1)
01-16 14:25:29.516: E/SummaryFragment(30647):   at android.os.AsyncTask$2.call(AsyncTask.java:288)
01-16 14:25:29.516: E/SummaryFragment(30647):   at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-16 14:25:29.516: E/SummaryFragment(30647):   at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
01-16 14:25:29.516: E/SummaryFragment(30647):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-16 14:25:29.516: E/SummaryFragment(30647):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-16 14:25:29.516: E/SummaryFragment(30647):   at java.lang.Thread.run(Thread.java:811)
01-16 14:25:29.516: D/SummaryFragment(30647): Not a NDE2Exception, got: NullPointerException

Areas such as Cambridge 005 cause a 400 error with the police API

From the test log:

Calling http://data.police.uk/api/crimes-street/all-crime?poly=52.22599,0.109064:52.225876,0.109453:52.225802,0.109712:52.225685,0.110069:52.22565,0.110239:52.225573,0.110501:52.225443,0.11094:52.225387,0.111128:52.225224,0.111666:52.225193,0.111919:52.22487,...&date=2013-08
API error: Code 400; message: A non-200 code was returned

The offending postcodes, area names and ons codes:

  • CB3 0AQ --> Cambridge 005 / E02003723

Police API docs do not mention why the error would occur -- though it may be because the area is larger than 20 km sq?

Move the area reference to AreaActivity

Things get hella confusing when fragments try to pull the area again, so why not keep the current area in the AreaActivity? Will also fix the orientation change issues (as Areas can be serialised).

Unfortunately it will not fix the postcode issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.