Category Archives: 3D Charting

Phil 8.14.15

8:00 – 6:00 SR

  • Doing the reverse commute today – meeting with Ronda between 3:00 – 4:00.
  • Could not get the userId over from the login directive over to the flyoutPanel directive. So rather than pass in individual values to the login, I’m now passing the same session object to both. That works fine. Cleaner, too:
    this.sessionMessageObject = {
        loggedIn:false,
        userId : -1,
        networkId: -1,
        serverTarget:"rssPull.php"
    };
  • I also like the way the call in the html looks:
    <ng-login-dialog message_obj = "mc.sessionMessageObject" ng-if = "mc.sessionMessageObject.loggedIn === false"></ng-login-dialog>

    It tells a better story, I think

  • Yay! got the service pulling down network names for a particular user!
  • Working on loading the full network.
  • For a break, started to migrate code to the server. The database won’t accept sourcing views generated by mysqldump -. I get an access denied. But using the the hand-coded sql in tnTableStructures, everything works.
  • Meeting with Ronda. The certs for the dev machine are bad? They seem to be OK on the production box. We installed tomcat and mySql on the dev box and verified that they were running.

Phil 8.13.15

8:00 – 5:00 SR

  • Still no admin
  • Gave Lenny the FizzBuzz test. He’s trying to solve it in Excel. And he did a fine job. Something to know about the Excel IF function. It’s an implicit ELSEIF. So always start with the narrow case and work out.
  • Going to add views to chart_data db for pulls, rather than submit a join directly.
    • Ok, that was awesome. Views. Are. The. Best.
    • Changing queries in the PHP to use the views. Done.
  • Get network listing, selecting and loading working
    • got the interface built and running
  • Make the query into a flyout where the buttons are still visible in the collapsed state. Will also have to change the size of the webgl div? Or just overlay it?
  • Updated lib to angular 1.4.3 – no changes that I can see.

Phil 5.12.15

8:00 – 3:00

  • Still no admin
  • Interview with Debbie. She’s very comfortable with MySql, but not so much with coding. She didn’t even try to solve the Fizz Buzz test. I told Chris that I’d be fine with her and a coder, but he can only afford everything in one package.
  • I need to add a MERGE association. It will chain up from one merge to the next going from higher number to lower number and will end at the lowest number and show that. In other words, I might want to merge (1, ‘Donald Trump’), (3, ‘Trump’), (6, ‘The Donald’) and (10, ‘Mr. Trump’). Each of these could have a merge association so we could chain 10->6->3->1.
  • Since I now know how to use networks, I’m going to build out the open/save network flyout panel. I think I can use ng-style?
  • And I fixed the CSS problems! It turns out that I was using the wrong CSS class name on the main page. It was being used in the directive HTML as well.
  • Making the flyout a directive that will share a data object with the controller. Which si going very smoothly. I think one of the patterns with angular and typescript is to limit the number of files that require referencing within many files. If you don’t have to do a lot of wiring, things go much faster. Of course, this is also an argument for automation…
    • Working through the styles and loading of the networks.

Phil 8.10.15

8:00 – 3:00

  • And still no admin
  • Today we figure out how to link items in the database that are linked in the display. Since a query can actually combine several sub-queries, I need to either send up an array of items or fire off multiple requests.
  • So first, I think that only the selected item(s) should be able to be the ‘parent’ of a query. That means that I first have to make it so that clicking on the space between items doesn’t unselect. Done. Now making multiple select if you hold down the ctrl key while clicking. Done.
  • Having a very annoying issue where the text api as used in the Alchemy PHP API is returning one thing and the Alchemy demo is returning something entirely different. I’m getting the former and want the latter:
    Array
    (
        [status] => OK
        [usage] => By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html
        [url] => http://krugman.blogs.nytimes.com//2015/06/29/the-awesome-gratuitousness-of-the-greek-crisis/
        [language] => english
        [text] => Barry Eichengreen ... fundamentally unworkable.
    )

    So why is this different?

      "status": "OK",
      "usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html",
      "url": "http://krugman.blogs.nytimes.com/2015/06/29/the-awesome-gratuitousness-of-the-greek-crisis/?_r=0",
      "language": "english",
      "text": [
        {
          "provider": "theconversation.com",
          "link": "https://theconversation.com/path-to-grexit-tragedy-paved-by-political-incompetence-43988"
        },
        {
          "provider": "krugman.blogs.nytimes.com",
          "link": "http://krugman.blogs.nytimes.com/2010/04/28/how-reversible-is-the-euro/"
        },
        {
          "provider": "www.imf.org",
          "link": "http://www.imf.org/external/pubs/ft/fm/2015/01/fmindex.htm"
        }
      ]
  • A Unifying Framework for Behavior-based Trust Models and who’s cited this

Phil 8.7.15

8:00 – 4:00 SR

  • And still no admin
  • Meeting with Debbie next Wednesday at 9:00
  • Fixed various timesheet issues
  • Working on storing and retrieving networks
    • Items should only be added, not deleted
      • Modifying GoogleNewsRSS so that it can create and retrieve items using networkDbIo – done
      • Sending up userId for queries. Also setting data xfer so that data is sent up as an IPostObject. – done
    • Is this the same for associations?
    • Associations are added and removed from tn_network_data
    • All sessions start with a default name (user+timestamp?), which can be modified
      • Added a description field to tn_networks.
      • Added a title field to tn_items that I somehow overlooked

Phil 7.30.15

8:00 – 4:30 SR

  • Still working on getting software for the new dev machine.
  • Added tn_ratings and tn_touches to handle historical behavior. I realized that items shouldn’t have histories in a relational db. Histories should point at items. Sideways thinking.
  • Setting up base and subclasses for the DbIO.
    • baseDbIo
      • improved fail returns
    • userDbIo
    • networkDbIo
      • getUserNetworks
  • Working on item find/add/change/delete PHP functions

Phil 7.29.15

8:00 – 4:30 SR

Phil 7.27.15

8:00 – 2:30 SR

  • I’m thinking about how the edges in a network can have certain characteristics
    • Bandwidth – the capacity of the edge. Can be expressed as used and potential
    • Frequency – how often the edge is used. Bandwidth provides a ceiling on this
    • Richness – I’m not sure how to think about this. In the most basic case, this could be an expression of information content (i.e. an infrequent transmission with lots of content is equivalent to a frequent transmission with low content). But when we layer on context and meaning, all kinds of additional information gets ‘compressed’ into the message – a glance can be nothing or everything. Ideally, the description of the edge should contain some way of accessing that context, and shouldn’t be considered simply a link
  • Along this lines, I found this paper: Lexical chains as representations of context for the detection and correction of malapropisms. Lexical chains are certainly one way of representing context.
  • Another way of thinking about richness is in terms of similarity. If the link is carrying the same payload over and over again, then there isn’t much richness. So can we look at similarity as a way of determining how rich a link is? An Information-Theoretic Definition of Similarity. And here’s looking at news headlines, which might be relevant to short posts or tweets: Similarity for news recommender systems
  • And this reminded me of Princeton’s WordNet, which could be really helpful.
  • Ok, back to the database
    • Based on the above thoughts, I’m adding assoc_type to tn_associations
    • Here’s a query that pulls all the parts together. According to everything I’ve read, joins are probably the most efficient way to do this (size and speed):
      select u.login as `Link Created By`, a.created_on as `Created On`, at.name as `Assoc Type`, si.text as Source, st.name as `Source Type`, ti.text as Target, tt.name as `Target Type`
      from  tn_associations a
      inner join tn_users u on a.user_id=u.uid
      inner join tn_types at on a.assoc_type = at.uid
      inner join tn_items si on a.source_id = si.uid
      inner join tn_types st on si.item_type = st.uid
      inner join tn_items ti on a.target_id = ti.uid
      inner join tn_types tt on ti.item_type = tt.uid;
    • Now I need to load and save a named network from a particular user or any variants up to and including all networks from all users, without redundant nodes/edges…

Phil 7.24.15

8:00 – 4:30 SR

  • Trying to get charts to work
  • Need to run Create Scratch Financial Data first
  • I think 2014 OM ACC is functioning correctly, but probably pointing at the wrong data. The chart is drawing, just need to figure out how to align the months.
  • Working on setting up the database for links as per the main goal. Think I’ve gotten a first pass on the tables. Need to remember how to use joins now. This helped a lot: http://stackoverflow.com/questions/3709560/mysql-join-three-tables

Phil 7.22.25

8:00 – 5:00 SR

  • Filled out contact info for Steve
  • The stricter trust chain did not work. I had Ronda go back to the looser one.
  • Fixed attraction/repulsion/linkScalar it’s 1.0, 10.0, 10.0 for defaults
  • Ran into a weirdness with <input type=”range> and browsers. Chrome is fine. FF and Chrome have differing default widths and margin/padding. Had to add the following to get all ranges to work similarly:
    .forceRange{
        position: absolute;
        width: 120px;
        right: 10px;
        margin: 0px;
        padding: 5px;
        z-index: 2;
    }
  • Back to figuring out the AlchemyNews API. Blew up the limit again, being careful. I think that the news API, aside from behaving poorly (things like ‘&q.enriched.url.concepts.concept.relevance=0.9’ don’t work). Think I’m going to add more user interaction and less machine learning. Store it all for later page ranking?

Phil 7.21.15

8:00 – 4:30 SR

  • Server is behaving with the stricter trustchain.
  • This is the AlchemyNews REST API Documentation, and the list of fields that can be returned. And Twitter access, BTW.
  • Blew through my limits for the day trying to figure out keywords. Asking for academic license.
  • A good example of how to group query elements: http://alchemyapi.readme.io/docs/sentiment-analysis
  • Need to add sliders for attraction and repulsion (network scalars?). Implemented. Now I need to figure out some good values. I think that we might just have to scale attraction for linked items. It should clean things up and cut down the math a bit.

Phil 7.17.15

8:00 – 2:00 SR

  • The production server is behaving again!
  • Wrote up some thoughts on TypeScript interfaces and fat arrow notation.
  • Working out more subtle network linkages. An item is current (selected?) has potentially several other items that will connect to it. Selecting should also bring up the search results associated with that item (create an itemlist of nearest neighbors). Maybe the item should be created before the results of the query come back. That might make things more modal.

Phil 7.16.15

8:00 – 4:30 SR

  • The production server isn’t visible through the browser, though the test server is. It first I thought it was pre-populated keychains, but when the servers are set up identically, the production server still doesn’t cooperate. Ronda’s putting in a ticket.
  • Helped Ronda generate a PKI request for the new dev server, she’s going to try to make it work on the other two.
  • Looking at Dong’s code, I cannot figure out why he needs fat arrow. His:
    public promiseCaller():void{
       this.promise = this.service.getQueries();
       this.promise.then(this.processData, this.errorData);
    }
    
    public processData = (data:any):void => {
       console.log("got data");
    };
    
    public errorData = (data:any):void => {
       alert("error getting data");
    };
  • And mine
    private goodUserQuery (response:any) {console.log("got data");}
    private goodUserQuery (response:any) {alert("error getting data");}
    public promiseCaller():void{
        this.queryService.submit(qstr, this.goodUserQuery, this.errorResponse);
    }
  • Which calls (in the service):
    public submit(query:string, goodResponse:any, errorResponse:any):any {
       return this.httpService(query).then(goodResponse, errorResponse);
    }
  • And it looks like Google won’t let me use their images as textures. Working at downloading on the server side and storing in a local directory, using PHP. That works just fine! And to keep from downloading the same pix all the time, added a check as well. PHP has pretty much everything you’d ever want to do stuff on the web. But no typing. Must check out Hack one of these days.
  • Adding connections. Finally! Simple conditions are working and up.

Phil 7.15.15

8:00 – 4:00SR

  • Prime day. May poke at that a bit. Disappointing.
  • Call Porsche for oil change and chin cover repair – nope. Tomorrow?
  • Get network connections working – Almost!
  • Add news API integration – nope