Git Product home page Git Product logo

p2p-lending's People

Contributors

aquintanas avatar limdor avatar

Watchers

 avatar  avatar

p2p-lending's Issues

Aggregate data in a single DataFrame

Instead of creating several DataFrames according to the investment platform, this issue will aggregate all of them in a single one. Then, the computations of statistics will be modified to use the unified DataFrame.

Add dashboard service

@limdor , you must use the following command to open the dashboard service:

python dashboard.py

that has the following expected output:

 * Serving Flask app 'dashboard' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:8050/ (Press CTRL+C to quit)

Then, open the dashboard in a browser.

Finally, upload the data.csv file by dropping it in the appropriate box. The expected result is:

Screenshot 2021-12-13 at 17 47 54

Create a data structure to make easy the reporting

I believe that a data structure is needed to make more straightforward statistics computation and reporting. I want to discuss if it is necessary and how it should be.

I propose to have a class with the aggregated investment data frame. Then, the functions that calculate statistics can work with this class to set the necessary information.

I think that this will help to split the reporting functions without duplicating some operations. For instance, we can compute country and loan originator percentages by computing once the total investment.

@limdor, what do you think? Can we arrange a call to talk about this possibility?

Change text appearing on mouse over

Change the text that appears on the pie chart on mouse over to show only the outstanding principal.
Instead of the following image:
image
It should show only the value underlined in read formatted with 2 decimals with the euro sign. (13.499,23€)

Bazel Build using MacOs does not work

I obtain the following error:

Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Repository pip instantiated at:
  /Users/aquintanas/BSC/git/p2p-lending/WORKSPACE:11:12: in <toplevel>
  /private/var/tmp/_bazel_root/258ef8fd9a91de21d575463e402686bb/external/rules_python/python/pip.bzl:53:19: in pip_install
Repository rule pip_repository defined at:
  /private/var/tmp/_bazel_root/258ef8fd9a91de21d575463e402686bb/external/rules_python/python/pip_install/pip_repository.bzl:67:33: in <toplevel>
ERROR: An error occurred during the fetch of repository 'pip':
   Traceback (most recent call last):
        File "/private/var/tmp/_bazel_root/258ef8fd9a91de21d575463e402686bb/external/rules_python/python/pip_install/pip_repository.bzl", line 63, column 13, in _pip_repository_impl
                fail("rules_python_external failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: rules_python_external failed:  (Timed out)
ERROR: Error fetching repository: Traceback (most recent call last):
        File "/private/var/tmp/_bazel_root/258ef8fd9a91de21d575463e402686bb/external/rules_python/python/pip_install/pip_repository.bzl", line 63, column 13, in _pip_repository_impl
                fail("rules_python_external failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: rules_python_external failed:  (Timed out)
ERROR: Skipping '//:main': no such package '@pip//': rules_python_external failed:  (Timed out)
WARNING: Target pattern parsing failed.
ERROR: no such package '@pip//': rules_python_external failed:  (Timed out)
INFO: Elapsed time: 616.653s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
    currently loading: 

Build label: 4.2.1-homebrew
MacOS: Big Sur 11.4

Add date to title and remove date column

Date column is always the same value. We could remove the Date column and just add the date next to the title.
image
We should decide what to do if there are files for different dates. One option would be to show a message and make it fail (do not allow multiple files), the other would be to show just under the title the date for each platform.

Reconsider how we get the latest report date

The application provides two modes, on to show past investements and another one to show only the latest.
The point here is how we calculate the latest date. If for one platform we have information of January and February and for the other we have January, February and March, the latest date will be different for both platforms.
This will mean that we will aggregate information for Platform A from February and Platform B from March. This is not necessary intuitive and can generate confusing.
We should consider in case we show only the latest information, to do it for the latest date that we have common for all platforms.

Report function as a JSON

This issue discusses how it should be reported the information parsed and computed. In the last meeting (22 September 2021), it was agreed that the most feasible option seems to be a JSON. Accordingly, I propose the following structure:

date_of_report = {
    overall_statistics = {
        overall_investment = X,
        number_loan_parts = X,
    },
    country_statistics = {
        percentage_loans_in_single_country = X,
        percentage_loans_in_three_countries = X,
    },
    originator_statistics = {
         percentage_loans_in_single_originator = X,
         percentage_loans_in_five_originators = X,
    },
    country_investment_data = { 
        dataFile = Y,
    },
    originator_investment_data = {
        dataFile = Z,
    }
}

@limdor , we should discuss the following points:

  • General structure
  • Key names
  • How to store the data. Now I propose in a different file, but It could be included in the JSON.

Finally, I am not 100% sure that in the future, we won't have to change to an RDBM.

Report a rough estimation of how much income will be generated the following month

For a given point in time we have the list of all credits with the amount of each of them and the interest.
This information is enough to report a rough estimation on how much income will be generated the next month.

For example:
100€ at 7%
50€ at 2%
would generate each
100 * 0.07 / 12 = 0.58€
50 * 0.02 / 12 = 0.08€
and in this case we would report that for next month there will be an income of 0.66€.

Of course this is not correct because a lot of parameters should be consider but this would give a rough estimation.
Some of the cases where this would fail:

  • if the payment is delayed
  • if the investment finishes before of the end of the month

Is a new way to organise tests necessary?

This is a inconsistent with what we have currently that all tests are in a test folder but we might consider if this is better because then the test is next to the file and we can clearly see what file has tests and which one not.

Originally posted by @limdor in #43 (comment)

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.