Wednesday, March 4, 2015

Blogger: How to Customize Status Bar

The status bar of Blogger or Blogspot is that rectangle shaped figure shown at the top of the ticket when we access the labels or do a search. By default, it has defined styles for the border, background and font, but it's neutral appearance is not always appropriate for the style you want on your blog. If you have a transparent background, for instance, the default status message might be hard to see once you put up a lighter wallpaper (usually an issue for the Awesome Blogger themes).

Customizing the status bar look

To customize this bar, it is necessary to add about 3 or 4 classes in the css section of the template:
  • status-msg-wrap (optional): the parent container of the bar is the place to define their location with respect to the inputs. 
  • status-msg-body : Class responsible for defining the message style; changes font size and font color. 
  • status-msg-border : Class that defines the edge, and changes the colors of that edge. 
  • status-msg-bg : Class that defines the background color of the message bar.
I dont think its very necessary to accompany these classes with the top selector "#main" to overwrite the default values, but it is a nice to have it. It at least makes certain for sure that the code will work, but don't be surprised if there are no problems otherwise.

For you to implement these 3 or 4 classes, go to the Template section in your blog's Design page and click on Edit HTML.

Dashboard > Template > Edit HTML


All that HTML code is your Blog template, and it is up to you to make sure you don't do enough to screw up any necessary functionality in your blog, so before you begin this, do yourself a favor:

back up your template!


Copy and paste it into some text editor you got somewhere. That way you don't have to worry about losing everything you worked to add to your blog's template.

Okay, so now you're at the HTML page, which should look like this.

Now I want you to click anywhere in the code page (just to make sure your computer knows you're referring to the code box and not the actual webpage), and do a search (CTL+F). Search for ]]> </ b: skin> and once you do, you are to take the code to change the status bar and place it above (or before) the ]]> </ b: skin>.

Examples

(The CSS code goes before ]]> </ b: skin>)

With all four classes...
       
#main .status-msg-wrap {
width: 90%;
padding: 5px;
}

#main .status-msg-body {
font-size: 80%;
text-align: left;
padding: 5px 5px 5px 30px;
width: auto;
}

#main .status-msg-border {
border: 1px solid # a19a36;
opacity: 1;
}

#main .status-msg-bg {
background: # FFF9B3 center left no-repeat;
opacity: 1;
}     
 
That will turn out to look like this.

  • .status-msg-body  font-size : alters the size of the text in the status message
  • .status-msg-body  text-align: sets the text to either the (center, left, right) of the status message box
  • .status-msg-body  width: deals with the width of the status message box
  • .status-msg-border  opacity: between 0 and 1, the closer to 1, the more visible the status message background is.
The way I did it just shows the designated label (I named the label "ECON") name so I have a quick understanding of what section I'm in.
       
/* Label Status Message
———————————————————————————————————————–*/
.status-msg-body {    /* This changes the font and font color  */
font: 100% Century Gothic;
color: #fff;
text-transform: uppercase;
font-weight: bold;
}

.status-msg-bg {    /* This changes the background color of massage bar */
background: #000000;
opacity: 1;
}

.status-msg-border {   /* This changes the color of the border */
border: 1px #e9d8d9;
opacity:0.7;
}        
       
 
That will look like this .



Changing the Status bar message

To add text to your label header, return to Edit HTML, then use Ctrl+F / Command F to find this code:

<data:navMessage/>


There may be about two of these codes, and in fact, it may just look like this, and in that case, just get rid of the first instance of the code.
  <div class='status-msg-wrap'>
    <div class='status-msg-body'>
      <data:navMessage/> <!--THIS CODE, GET RID OF IT-->
    </div>
    <div class='status-msg-border'>
      <div class='status-msg-bg'>
        <div class='status-msg-hidden'><data:navMessage/></div>
      </div>
    </div>
  </div>
  <div style='clear: both;'/>
  </b:if>        

Type the message you wish to appear on your label header, such as:

You are now viewing my rants on:  <data:blog.searchLabel/>


Where <data:blog.searchLabel/> is the code that will reflect the link to your label (so if one of your labels is "Help" or "World News", this code will directly correspond to that).

Now, your status bar should instead say that, or if you want to just show the label name, just use the <data:blog.searchLabel/> code by itself in place of the first <data:navMessage/> and click save. It should look like this.
 <div class='status-msg-wrap'>
    <div class='status-msg-body'>
      <data:blog.searchLabel/>
    </div>
    <div class='status-msg-border'>
      <div class='status-msg-bg'>
        <div class='status-msg-hidden'><data:navMessage/></div>
      </div>
    </div>
  </div>
  <div style='clear: both;'/>
  </b:if>       

Changing the label colors 

Return to Edit HTML, then use Ctrl+F / Command F to find the same code we have been working with:

<data:blog.searchLabel/>


And to change the message color, font, or style, simply add the needed font tags.

<font color=”red”>You are now viewing my rants on: </ font>


Afterwards, just click Save. Your new label header should now appear whenever you click on any of your post labels.

Conclusion

The Blogger status bar structure is a bit complex, maybe poorly organized, so to customize this part properly, much care should be taken to overwrite all default styles.

Note: Strangely the status bar message repeated twice, only one of them has attributes for no show, apparently blogger team made the various elements of your templates steam.

Note: This post was heavily influenced by someone else's post. I felt there was a need to add a bit more pieces of information, so I adapted it, but you are more than free to check out the original source.
Read More »

Tuesday, March 3, 2015

We all search for truth, when you think about it...

Just because someone holds a belief does not in anyway mean they should be left alone to it. That is not who we are as people. We long for relationships and part of our longing is our exploration of each other and who we are in relation to each other. It is easy to get frustrated with someone you don't agree with (over touchy subjects in particular), but we ought to remember that while people are equal, ideas are not. The world will challenge us everyday on what we believe, whether we argue about it or not, and we are always somehow putting our worldview to the test. If we understand certain things about what we believe to be false, then we will fix for that; otherwise, we continue to hold it. We do this because we long for meaning and significance in this life. We search for truth everyday, and we get closer to it (or we think we get closer) through engagement with each other, trial and error, exploring, and sharing ideas.

Read More »

Sunday, March 1, 2015

Don't forget inflation!!

What if the US gets caught in the deflationary whirlpool that Europe is currently in? Pervasive economic weakness in the rich world and a slowdown in Chinese growth are leading causes for the sinking rate of inflation over the last few years, and oil prices haven't been much help either, pushing inflation into negative territory across much of the euro area. With inflation rates have dropping below 1%, the possibility is out there that the US may soon join Europe in deflation.

Besides that, inflation definitely deserves an observation for reasons beyond the possibility of deflation. When we think about jobs and the employment scene, we think a lot about looking at unemployment rates, underemployment rates and even job growth rates, but inflation matters in this too. When the economy is strong, we should be seeing signs of inflationary pressures, but with these inflation rates, that is a big sign that there's room for improvement in the economy. One of those improvements ought to be in wages.

Wages are positively related to labor productivity, which means that when labor productivity increases, so do wages, hypothetically speaking. If nominal wages increase faster than increases in labor productivity, then we will have inflation in the economy, or should have inflation in the economy, assuming that we're not dealing with stagnant wages (which we are!).
Read More »

Friday, February 27, 2015

Not all about Supply and Demand: the case of oil prices

It wasn't long ago when we thought oil was a scarce commodity in the US. Now we have more oil in our stock piles than ever before, but oddly enough, sometimes we see conflicting signals. Hypothetically, the excess oil should be leading to lowered prices, but the sometimes the opposite occurs.

For instance, Marketplace's Dan Weissmann (@danweissmann) made a short on fluctuating oil prices where he featured a story on oil prices going up because the inventory went up. According to his interviewee, Walter Zimmerman, prices went up out due to imperfect information. With oil supply in excess, some traders expected prices to crash, but they didn't, and that may have worried some traders, so they bid prices up. As a correction, the oil prices dipped for the next days, but Zimmerman claims that this kind of thing is common in oil trading.

Its one thing to know the factors that shape oil prices over time, but figuring out which of those factors are most important is really hard. Sometimes it is neither about supply or demand, but about debt. But perhaps this is just something common to the world of trading. Sometimes you expect certain outcomes, and the disappointing results remind you every now and then that you aren't a wizard.
Read More »

Friday, February 20, 2015

Un- and Under-researched topics in (Counter-) Terrorism Studies

An article by Alex P. Schmid lists 50 topics in the field of (counter-)terrorism that are either un-researched or under-researched. Im not going to list them all here, but there are a few that caught my eye.

ISIS vs. al Qaeda: comparing and contrasting organizational structures.

ISIS's rise to infamy was rather fascinating. In 2014, they took over portions of Iraq and were aiming to achieve their goal of a caliphate. The world definately took notice, and ISIS might have been considered more dangerous a group than al Qaeda around that time, but the very fact that there was an al Qaeda and an ISIS shows that there was a different in ideology and (perhaps) management. What separates ISIS from al Qaeda? Are they organized any differently?

Terrorists released from prison: subsequent careers.

This would be an interesting find. What happens to extremists after being released from prison? Where do they go? How do these people attempt to re-assimilate into society? Do they try? Is their view on what society is and their path to extremism rather one and the same?

The targeting logic of terrorist attacks

(I think this was already explored in Berman's book, to a degree) What mode of attack do extremists use and under what circumstances do they use them? Why do they choose that particular mode of attack?

The terrorism - organized crime nexus: new insights and developments

This is by far one of the topics that I'm most interested in. Terrorism and organized crime aim at different kinds of ends, but find more use for each other than the public knows. What might we learn about (and from) the crossover between terrorism and drug trafficking? What about terrorism and human trafficking? etc.

Other:

  • Freedom of speech vs. incitement to terrorism: the response of the courts
  • Muslims, Christians, Hindus, Jews, and Buddhists under attack for their faith: a quantitative comparison in the post-Cold War period – claims vs. facts.
  • The Arab Awakening and its possible implications for terrorism and international counterterrorism cooperation.
  • Is there a disconnect between academic research on terrorism and the counter-terrorist intelligence community's knowledge (and knowledge requirements) regarding terrorism?
  • Non-violent popular revolt and Salafist Jihadism: competing paradigms for political change in the Islamic world.
  • New strategies for identifying and countering extremist ideologies on the Internet.
  • The rehabilitation of terrorists vs. the rehabilitation of common criminals in prison: recidivism records compared

Resources

Schmid, A. 2011. "50 Un- and Under-researched Topics in the Field of (Counter-) Terrorism Studies". Perspectives on Terrorism Vol 5, No 1.
Read More »

Friday, February 13, 2015

Gretl: Picking between stacked time-series and stacked cross-sectional formats

When you're doing panel data regression in GRETL or any statistical software, you need your data formatted in a way that differentiates the time series dimensions from the cross sectional dimensions, which is more sophisticated and more informative in that matter. In GRETL, you can do this by allowing the software to "flatten" the data being used in two different ways:
  • Stacked cross-sections: the successive vertical blocks each comprise a cross-section for a given period.
  • Stacked time-series: the successive vertical blocks each comprise a time series for a given cross-sectional unit.
 ...but these two get confusing because they both seem to be the same thing, having the same options to set the number of cross-sectional units and time periods, regardless of whether you choose to make it 'stacked cross sections' or 'stacked time series'.
So it made me wonder whats so important about one versus the other, and whether it should matter which one you pick, and based off on the searches I made, it turns out that these options GRETL ultimately end up turning the data into just, stacked time series. A word from Allin Cottrell, one of GRETL's founders, sheds some light on this case. 

Allin Cottrell:
...maybe it's a bit confusing but in fact it is intended. The main point is that a panel dataset _must_ be organized as stacked time series for use in gretl. "Stacked cross sections" is not an option for panel data in gretl, it's just a way of saying that your data are currently the wrong way round and need to be fixed. 
So, if you go to "/Data/Dataset structure" and say that your dataset is stacked cross sections, gretl will reorganize it for you as stacked time series (a "physical" reorganization of the data). Note that if you then go back to the "Dataset structure" dialog your data will initially appear as "Stacked time series", so, naturally, stating that the structure is stacked time series will produce no change. 
If you want to change the actual data layout back to what it was originally, you have to say that it's stacked cross sections (again), and gretl will reorganize the data in the opposite direction.
Perhaps that could be easier for users to understand in later updates.
Read More »

Wednesday, February 4, 2015

Migrations and Diasporas of New York

A fascinating NYT post describes our migration patterns to and fro each state.

The migration data is based on Census data, particularly ipums, which was used to compare the state of residence versus the state of birth of a representative sample of Census forms. According to information aesthetics, the visualization technique used in this post "resembles that of organically shaped, stacked area graphs, also coined as stream graphs or ThemeRiver.

For a glimpse, here is are two visuals on the migration patterns in NY.

MIGRATION INTO NEW YORK (NYT):
The image of New York as a beacon that attracts all is definitely true for immigrants, but for people born in the United States, the picture is more complicated. With the recent growth in immigration, the percentage of foreign-born residents in New York is approaching Ellis Island days. But domestically, one of the less-noticed trends is the decline in population of blacks born in other states. Since 1980, the population of Southern-born blacks has declined by more than 350,000. You can also see in the "U.S. Other" category the impact of migration from Puerto Rico, which was particularly large in the post-war years.
DIASPORA OUT OF NEW YORK (NYT):
Of the 20 million New Yorkers alive today, nearly one in six are now in the South, an idea that would have been almost unthinkable 50 years ago. Florida is still the main attraction, followed by New Jersey. But in terms of growth, since 1980 the number of New Yorkers living in South Carolina increased by about as much as the number living across the Hudson River. As our colleague Nate Cohn puts it, one of the state's leading exports is its people.
Read More »