IndyWatch Education Feed Archiver

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

IndyWatch Education Feed was generated at Community Resources IndyWatch.

Sunday, 11 February


Introduction to Mongoose for MongoDB "IndyWatch Feed Education"

Mongoose is an Object Data Modeling (ODM) library for MongoDB and Node.js. It manages relationships between data, provides schema validation, and is used to translate between objects in code and the representation of those objects in MongoDB.

Object Mapping between Node and MongoDB managed via Mongoose

MongoDB is a schema-less NoSQL document database. It means you can store JSON documents in it, and the structure of these documents can vary as it is not enforced like SQL databases. This is one of the advantages of using NoSQL as it speeds up application development and reduces the complexity of deployments.

Below is an example of how data is stored in Mongo vs. SQL Database:

NoSQL Documents vs. Relational Tables in SQL



Collections in Mongo are equivalent to tables in relational databases. They can hold multiple JSON documents.


Documents are equivalent to records or rows of data in SQL. While a SQL row can reference data in other tables, Mongo documents usually combine that in a document.


Fields or attributes are similar to columns in a SQL table.


While Mongo is schema-less, SQL defines a schema via the table definition. A Mongoose schema is a document data structure (or shape of the document) that is enforced via the application layer.


Models are higher-order constructors that take a schema and create an instance of a document equivalent to records in a relational database.

Getting Started

Mongo Installation

Before we get started, lets setup Mongo. You can choose from one of the following options (we are using option #1 for this article):

  1. Create a free sandbox database subscription on mLab
  2. Install Mongo using Docker if you prefer to use docker

Lets navigate through some of the basics of Mongoose by implementing a model that represents data for a simplified address book.

I am using Visual Studio Code, Node 8.9,...


How to build a Realtime Graph using JavaScript and Pusher "IndyWatch Feed Education"

The world needs everything uber-fast now. There are plenty of data streams being generated by different systems every day. They serve in making decisions in many industries. Realtime monitoring and analysis have become very important today. Data streams include realtime monitoring of website traffic, server performance, weather updates, and IOT sensors. It is important to analyze and interpret this burst of data, for which interactive charts and graphs are an excellent solution.

In this article, we will be building a Node.js Server to expose APIs to provide historical data for a metric (in this case, weather in London). It will also provides an API to ingest new data points. We will also be building a front-end app with a Line Chart to display the temperature changes in London weather in realtime. The application we build will look something like this:

Signup for Pusher

The first step to start this tutorial is to Signup at Pusher or login with your existing credentials if you already have an account. After logging in, you will need to create a new app and select Vanilla JavaScript for the front-end along with Node.js for the back-end. You will then be brought to a landing page containing the getting started code for both front-end and back-end, which we will use later on in the tutorial.

Node.js Server APIs for Monitoring and Analytics System

The essential APIs for any analytics systems for any metric or entity are:

  1. Ingestion APIAn API to ingest the new data points for any particular entity. In our server for this blog post, we will make an API to ingest new temperature data at a particular time for London. This API can be called by any global weather system or any IOT sensor.
  2. Historical Data APIThis API will return all the data within a range from this date in time. For our server, we will create a simple API. It will return some static historical data with limited data points for Londons temperature values for any day.

Node.js Express Server Skeleton

We will create a basic Express Server along with instantiating the Pusher library server instance. We will create a new folder for our project and create a new file server.js. Add the following code to this file:

API to Get Historical Temperature Data

Now, we will add some static data regarding Londons temp...


How to Predict Rent and Select the Best Lease Duration to Save Money "IndyWatch Feed Education"

In my last post, we talked about how to pick the best month to sign the lease based on seasonality. Now, how long should you sign the lease for when facing different options like 12-month, 15-month, 18-month or longer? Is there any strategy in selecting the best option to save money?

To analyze this, I modelled 353 cities rent data from Zillow (one-bedroom, city-level data). In this article, I will show you how to make time series predictions, and which cities are predicted to increase the most in rent!

First, how does lease duration help you save money?

As shown below, you can save money by signing a longer lease if you predict the rent will increase in your city. If the monthly rent increases $100 in the next year, youll save $1,200 by signing a 2-year lease, then renew it year-by-year.

How do you predict if rent will increase?

We observed that rent is an additive time series with a combination of seasonality, trend and some random noise.

Additive model: Y(t) =Seasonality(t) + Trend(t) + Randomness(t)

We can decompose a time series into the right hand side of the equation above by applying Rs stl() function (stl stands for "seasonal and trend decomposition using locally weighted scatterplot smoothing).

# Decompose the additive time series
decomposed_rent <- stl(rent.series, s.window="periodic")
#periodic means the seasonality factor is same for every year
# Extract the components from time series
seasonal <- decomposed_rent$time.series[,1]
trend <- decomposed_rent$time.series[,2]
random <- decomposed_rent$time.series[,3]
The plot of the decomposed time series of rent verified that the components are additive, where rent = Seasonality + Trend + Randomness

You can simply apply the st() function in R on the time series format of rent data to predict rent in the next 2 years.

# Forecast rent for the next 24 months with 95% Confidence Interval
fore_rent<-stlf(rent.series, s.window="period",h=24, level = 95)

Which cities have the predicted increase of rent?

*How to read the plots: The light green band area after 2018 is the 95% Confidence Interval of the rent prediction. The...


Going deeper: A history of ideas in AI research "IndyWatch Feed Education"

Do Androids Dream of Electric Sheep? Lets go back to a time when AI questions were more straightforward (but still difficult to answer).

Frankenstein may contain parallels relevant to the present day. Mary Shelleys Gothic novel contains a discussion on the consequences of creating and introducing an artificial being into society. The Creature puzzles us with its inhuman atrocity and yet human manifestations of weakness, need for companionship and existential crisis.

One could say that we should focus on the future and the consequences of our discoveries. But how can one focus on the chaos created by injecting an army of Creatures into a system so complicated as contemporary society? One could also focus on the achievements, the success-stories that made these ideas sound veracious. But how can one ex post discriminate between correct intuition and luck?

It takes self-restraint, and wisdom, to set aside for a while the branches of your work and evaluate the firmness of its roots. A blooming tree can be distracting.

Whether you are tracing the rules of logical thinking in the ancient Greek philosophers, the formulation of reasoning in Arabic mathematicians or the power of mathematical knowledge in 19th century intellectualsone unsettling notion becomes clear: the questions are deeper than the networks you can design (even taking Moores law into account).

I believe that what we become depends on what our fathers teach us at odd moments, when they arent trying to teach us. We are formed by little scraps of wisdom.
Umberto Eco

The rest of the discussion will emerge from the history of AI. Not the history of achievements, but the history of questions, arguments and beliefs of some significant individuals. Most of the events revolve around the 60s, the era AI acquired its official definition, its purpose, its scientific community and its opponents.

Can machines think?

In 1950 Alan Turing attempts to answer this purposely simplistically-expressed, question in his seminal paper...


Smart speakers and A.I. will give your physician superpowers "IndyWatch Feed Education"

As a hybrid physician/engineer, I spend a lot of time pondering how new platforms can empower doctors.

I am particularly excited about the potential of smart speakers coupled with advances in A.I. and natural language processing (also looking at you, blockchain). I am bullish on conversational agents in general, previously building an iOS chatbot powered by Watson that simulates a human radiologist. Chatbots are cool and useful, but voicethat might be magic.

Sensing potential, I decided to hunker down with my trusty corgi, drink a bunch of coffee, and start building the cool voice tools I want to use in my own clinical practice. This experience made me a lot more excited.

In this article I will synthesize my findings, show a bunch of fun demo videos, and explain why smart speakers represent a transformative technology in healthcare.

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

Saturday, 10 February


Disguising Imperialism: How Textbooks Get the Cold War Wrong and Dupe Students "IndyWatch Feed Education"

Disguising Imperialism (Article) | Zinn Education ProjectBy Ursula Wolfe-Rocca

Recently, with the possibility of Special Counsel Robert Mueller III subpoenaing President Trump in the headlines, I found myself discussing the Russian hacking allegations with my U.S. History class. Having just finished our Cold War unit, my students were much less concerned about Russia tampering with U.S. elections than they were about the historical amnesia regarding the past meddling of the U.S. government. Max said: Why is the media making such a big deal about this? What the Russians are accused of is nothing compared to what the U.S. did in Cuba. Sarah added, I mean I know its bad to have the Russians hacking us, but its not like anyone died. In Congo, the leader was killed.

In the days following the original revelations of Russian hacking, some journalists sought to remind readers of the United States own sordid past of foreign meddling. CNN, for example, ran a piece by Chilean author Ariel Dorfman about the U.S. role in overthrowing the democratically elected Chilean leader Salvador Allende in 1973. Dorfmans readers could be forgiven if they did not recognize Allendes name. They might never have heard of these either: Patrice Lumumba, Mohammad Mossadegh,...

Saturday, 06 August


The Case for Gender Studies "IndyWatch Feed Education"


In 2002, a group of high school girls approached their male teacher and argued that his course needed to include a study of gender. After all, it was titled Citizenship and Social Justice and included an intensive study of race and racism. 

Predictably, this White male teacher responded defensively. We cant study everything, he retorted. If we include gender, doesnt that mean we have include every social justice issue? Thats impossible. Where do we draw the line? 

These young women persisted, even offering to help plan the curriculum. Fortunately, they didnt need to stage a sit-in or lead a hunger strike or chain themselves to chairs to convince their teacher. 

If you havent already guessed, that defensive male teacher was yours truly. Despite my status-quo-subverting teaching, I had become the man, the barrier that students had to surmount before receiving the education they deserved. 

And it makes sense that I had been more equipped to teach about race than gender. Throughout my career, I have found numerous trainings on racism to aid a teacher. Gender justice trainings, on the other hand, are few and far between. 


IndyWatch Education Feed Archiver

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

IndyWatch Education Feed was generated at Community Resources IndyWatch.

Resource generated at IndyWatch using aliasfeed and rawdog