Phil 1.21.19

9:00 – 3:30 ASRC NASA

woodgrain

Starting the day off right

    • Less than you think: Prevalence and predictors of fake news dissemination on Facebook
      • So-called “fake news” has renewed concerns about the prevalence and effects of misinformation in political campaigns. Given the potential for widespread dissemination of this material, we examine the individual-level characteristics associated with sharing false articles during the 2016 U.S. presidential campaign. To do so, we uniquely link an original survey with respondents’ sharing activity as recorded in Facebook profile data. First and foremost, we find that sharing this content was a relatively rare activity. Conservatives were more likely to share articles from fake news domains, which in 2016 were largely pro-Trump in orientation, than liberals or moderates. We also find a strong age effect, which persists after controlling for partisanship and ideology: On average, users over 65 shared nearly seven times as many articles from fake news domains as the youngest age group.
  • Working with Aaron on plumbing up the analytic pieces
  • Getting interpolation to work. Done! Kind of tricky, I had to iterate in reverse over the range so that I didn’t step on my indexes. By the way, this is how Python code looks if you’re not a Python programmer:
def interpolate(self):
    num_entries = len(self.data)
    # we step backwards so that inserts don't mess up our indexing
    for i in reversed(range(0, num_entries - 1)):
        current = self.data[i]
        next = self.data[i + 1]
        next_month = current.fiscal_month + 1
        if next_month > 12:
            next_month = 1
        if next_month != next.fiscal_month: # NOTE: This will not work if there is exactly one year between disbursements
            # we need to make some entries and insert them in the list
            target_month = next.fiscal_month
            if next.fiscal_month < current.fiscal_month:
                target_month += 12
            #print("interpolating between current month {} and target month {} / next fiscal {}".format(current.fiscal_month, target_month, next.fiscal_month))
            for fm in reversed(range(current.fiscal_month+1, target_month)):
                new_entry = PredictionEntry(current.get_creation_query_result())
                new_entry.override_dates(current.fiscal_year, fm)
                self.data.insert(i+1, new_entry)
                #print("\tgenerateing fiscal_month {}".format(fm))
  • So this:
tuple = 70/1042/402 contract expires: 2018-12-30 23:59:59
fiscalmonth = 9, fiscalyear = 2017, value = 85000.0, balance = 85000.0
fiscalmonth = 12, fiscalyear = 2017, value = -11041.23, balance = 73958.77
fiscalmonth = 1, fiscalyear = 2018, value = 0.0, balance = 73958.77
fiscalmonth = 2, fiscalyear = 2018, value = -28839.7, balance = 45119.07
fiscalmonth = 3, fiscalyear = 2018, value = 171490.55, balance = 216609.62
fiscalmonth = 4, fiscalyear = 2018, value = -14539.61, balance = 202070.01
fiscalmonth = 5, fiscalyear = 2018, value = -15608.09, balance = 186461.92
fiscalmonth = 9, fiscalyear = 2018, value = -60967.36, balance = 125494.56
fiscalmonth = 10, fiscalyear = 2018, value = -14211.78, balance = 111282.78
fiscalmonth = 1, fiscalyear = 2019, value = -23942.68, balance = 87340.1
fiscalmonth = 2, fiscalyear = 2019, value = -35380.81, balance = 51959.29
  • Gets expanded to this
tuple = 70/1042/402 contract expires: 2018-12-30 23:59:59
fiscalmonth = 9, fiscalyear = 2017, value = 85000.0, balance = 85000.0
fiscalmonth = 10, fiscalyear = 2017, value = 85000.0, balance = 85000.0
fiscalmonth = 11, fiscalyear = 2017, value = 85000.0, balance = 85000.0
fiscalmonth = 12, fiscalyear = 2017, value = -11041.23, balance = 73958.77
fiscalmonth = 1, fiscalyear = 2018, value = 0.0, balance = 73958.77
fiscalmonth = 2, fiscalyear = 2018, value = -28839.7, balance = 45119.07
fiscalmonth = 3, fiscalyear = 2018, value = 171490.55, balance = 216609.62
fiscalmonth = 4, fiscalyear = 2018, value = -14539.61, balance = 202070.01
fiscalmonth = 5, fiscalyear = 2018, value = -15608.09, balance = 186461.92
fiscalmonth = 6, fiscalyear = 2018, value = -15608.09, balance = 186461.92
fiscalmonth = 7, fiscalyear = 2018, value = -15608.09, balance = 186461.92
fiscalmonth = 8, fiscalyear = 2018, value = -15608.09, balance = 186461.92
fiscalmonth = 9, fiscalyear = 2018, value = -60967.36, balance = 125494.56
fiscalmonth = 10, fiscalyear = 2018, value = -14211.78, balance = 111282.78
fiscalmonth = 11, fiscalyear = 2018, value = -14211.78, balance = 111282.78
fiscalmonth = 12, fiscalyear = 2018, value = -14211.78, balance = 111282.78
fiscalmonth = 1, fiscalyear = 2019, value = -23942.68, balance = 87340.1
fiscalmonth = 2, fiscalyear = 2019, value = -35380.81, balance = 51959.29
  • Next steps
    • Get the historical data to Aaron’s code
    • Get the predictions and intervals back
    • Store the raw data
    • update and insert the lineitems

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.