Author Archives: WQ

About WQ

I received my PhD (2013) in Remote Sensing, Earth and Space Science at the Dept. of Aerospace Engineering Sciences, University of Colorado, Boulder, USA, under a Fulbright fellowship. Currently, I'm an Assistant Professor in the Dept. of Space Science at Institute of Space Technology (IST), Islamabad, Pakistan, where I have been a founding member of the Geospatial Research & Education Lab (GREL). My general expertise is in Remote Sensing where I have worked with various remote sensing datasets through my career, while for my PhD thesis I specifically worked on Remote Sensing using SAR (Synthetic Aperture Radar) and Oceanography, working extensively on development of techniques to measure ocean surface currents from space-borne SAR intensity images and interferometric data. My research interests are: Remote sensing, Synthetic Aperture Radar (SAR) imagery and interferometric data processing & analysis, Visible/Infrared/High-resolution satellite image processing & analysis, Oceanography, Earth system study and modelling, LIDAR data processing and analysis, Scientific programming. I am a reviewer for IEEE Transactions on Geoscience & Remote Sensing, Forest Ecosystems, GIScience & Remote Sensing, Journal of African Earth Sciences, and Italian Journal of Agronomy. I am an alumnus of Pakistan National Physics Talent Contest (NPTC), an alumnus of the Lindau Nobel Laureate Meetings, a Fulbright alumnus, and the Pakistan National Point of Contact for Space Generation Advisory Council (SGAC). I was an invited speaker at the TEDxIslamabad event held in Nov., 2014. I've served as mentor in the NASA International Space App Challenge Islamabad events in April 2015 and April 2016.

Mapping and Visualization for Pakistan General Election 2018

Recently, the General Election 2018 was held in Pakistan. I was following with interest some of the mapping and visualization tools developed and used by different media outlets for communicating and consolidating the election results. Below I give a brief overview of the different visualizations used. Please note that these are just my personal views, and I am not a “GIS expert” per se to really comment on the technical tools and implementation. I am just giving my opinion from a user perspective and an EO scientist / professional.

DAWN:

https://www.dawn.com/elections/map/

DAWNmap

Screenshot of DAWN Election Map

This was developed by DAWN GIS team and TPL Maps. I liked the layout and the map design; the map information is very detailed at different zoom levels. The idea of displaying election constituency labels by hovering over the areas was very nice. However, I feel that the map was not utilized to its full capacity. As a EO professional, I would have loved if DAWN would have used this map as a focus point for their election coverage, but instead it was relegated a bit to the side. Also, as you can see now, none of the election results are updated / available on this map, and it only shows the major candidates for each constituency. However, at the same time, they show the past election results in a nice graphical format, which was a good idea. The search functionality is also good.

Geo TV:

https://www.geo.tv/election/results

geomap

Screenshot of GEO election map

The Geo TV map-like output is good in that way it immediately lets the user see which party won which constituency through the color-coding. However, there is no color legend, not even in the table below showing the overall election results. Yes, there is a little bit color coding when we open the results from the top bar. But the effort needed a lot of contribution from a user-interface designer or someone similar. Also, I am not sure how much true “GIS” was used here. A good feature is when you click “details” it takes the user to another page with lot of details about the constituency.

BBC Urdu:

https://www.bbc.com/urdu/pakistan-44922604

This map also uses the hover labeling as in the DAWN map; however the DAWN map hover is better as it also auto-highlights the constituency to give a better interactive response to the user. Furthermore, the map frame size is too small; would have been better to use the full page width. Both 2013 and 2018 election results are updated. The search functionality is useful. The color legend makes the map very user-friendly.

Plotree:

https://plotree.github.io/elections/

A unique and very interesting visualization by Plotree. I don’t know how much actual “GIS” is used here, for example there are no constituency boundaries, but perhaps this is a decision by the developers to not clutter with too much information. There are many unique and interesting visualisation features here, such as: the circle size shows vote margin for winner, just hovering over the circle shows succinct summary of voting details, using the filter can immediately show location-wise which parties have won more. None of the other maps have given a map for provincial elections, but Plotree maps give results of each province as well. There is also the District Wise Vote Share feature, which I invite the readers to explore themselves.

Advertisements

Difference in “date” function implementation in Mac OSX and Ubuntu bash

A few weeks ago, I had written some bash code in Max OSX terminal to identify the current date, and then defining the date a few days back in time. When I tried to run the same code in Ubuntu bash terminal, the code line for identifying the previous date fails. Some brief time spent on Google told me that there is some difference in how the “date” function is implemented in Mac OSX and Ubuntu bash. The correct usage is as follows:

curr_date=$(date +”%Y%m%d”)
echo ‘Current date: ‘$curr_date

# Find the date 3 days ago – For OSX bash:
prev_date_OSX=$(date -v-3d +”%Y%m%d”)
echo ‘Previous date: ‘$prev_date

# Find the date 3 days ago – For Linux Ubuntu bash:
prev_date=$(date -d “3 days ago” +”%Y%m%d”)
echo ‘Previous date: ‘$prev_date

Uninstalling User-Installed Python from macOS Sierra

macOS Sierra comes with a built-in default Python installation. On macOS Sierra 10.12.6, this default installation is on the /System/Library/Frameworks folder (which, by the way, is a critical system folder and should not be touched). macOS Sierra 10.12.6 comes with Python 2.7, which is getting outdated very fast, and also Apple itself recommends officially that to run a coding project, users should install their own updated version of Python with their own dependencies setup.

I had installed Python 2.7 myself last year when I was in a mood to start working on Python, and at that time I didn’t know that Python comes installed in macOS by default. Now I have to start working with Python in earnest for a project, and wanted to uninstall the custom Python 2.7 installation, so that I can start from scratch on a new installation of Python 3. This required some web-surfing, and some hours to figure out how to do it properly. After reading and deciphering some posts by others, I can now give an updated clean solution.

This assumes you have a good knowledge of shell / bash usage. This works for Python 2.7 installed by the user, but I am sure it works the same if you want to uninstall Python 3 from macOS Sierra too.

  • Step 1: Manually remove Python 2.7 folder from Applications (drag to Trash).
  • Step 2: Remove the Python 2.7 framework from /Library through the terminal:   sudo rm -rf /Library/Frameworks/Python.framework
  • Step 3: Clear python files from /usr/local/bin:      sudo rm -rf /usr/local/bin/python*
  • Step 4: Clear symbolic links to deleted Python files. If you have Homebrew installed already (highly recommended), then simply run brew doctor first, which will show you the broken symbolic links. Then just run brew prune to fix them (you can check it by running brew doctor again). If you don’t have Homebrew installed, then follow Step 3 here.

For more discussions, see this, this, and this.

Now we are ready for a fresh Python install from scratch!

NOTE: After uninstallation, I do need to fix the system to call the default python version installed in macOS Sierra. Probably need to revise some path specifications. But I am more concerned with the new Python3 installation at this point :). See here for more on this.

CAUTION: Under no circumstances should you try to delete or touch anything in the /System or /usr/bin/python folders. This can cause your macOS to malfunction, your Macbook could self-destruct, and there is a possibility of an alien invasion as well. If you don’t believe me, just do a web search on why not to touch anything in the macOS /System folder.

The SAR Journal Webpage and Community

I just discovered this amazing Synthetic Aperture Radar (SAR) website and magazine site, so aptly named as www.syntheticapertureradar.com. The website and content in it is quite amazing, and being a SAR aficionado, I have immediately signed up for their newsletter. I wish someone sends me an invite to the “Community” also, it seems to be only by invitation 🙂

In their own words, the website managers “represent the worldwide airborne and spaceborne SAR community worldwide. We are operated, moderated and maintained by members of the SAR community.”

So take a look at the SAR Journal website and sign up for the newsletter:

www.syntheticapertureradar.com

 

GLaSS and EOMORES Inland Water Remote Sensing Projects

_DSC0230 copy

Phander Lake in District Ghizer, Gilgit-Baltistan, Pakistan. Photo credits: Auhor

The EU collaborative project GlaSS (Global Lakes Sentinel Services) developed tools, algorithms and applications for the monitoring of global lakes and reservoirs using the Copernicus Sentinel-2 (S2) optical and Sentinel-3 (S3) satellite data, and also USGS Landsat 8 data. The great thing about this project is that the results and developed data processing methodology have been made available online as training material in a very detailed and systematic manner. I have gone through them briefly, and they are readily usable in undergraduate or graduate level courses in remote sensing, especially water & hydrology remote sensing focussed courses. There are 10 lessons in total. Take a look at the GlaSS training material here:

http://www.glass-project.eu/training-material/

The GlaSS project has lead to various news reports and scientific publications. The project was finished few months ago, and in fact seems to have transitioned into the EU H2020 EOMORES (Earth Observation-Based Services For Monitoring And Reporting Of Ecological Status) project, which claims to be a project “aiming to develop commercial services for monitoring the quality of inland and coastal water bodies, using data from Earth Observation satellites and in situ sensors to measure, model and forecast water quality parameters.” The EOMORES project has just started few months ago, and we look forward to seeing what results it brings us in the future.

 

Imagery Downlinked from Satellite to Ground in 6 Minutes

Some months ago, I had written about the EDRS SpaceDataHighway and real-time provision of Sentinel-1 satellite imagery through laser link and satellite relay. Now, ESA has done an experiment with Sentinel-2B to deliver imagery to the ground moments after it was capture by the satellite. The captured image strip was downlinked in just 6 minutes. This experiment brings us closer to the amazing future when we would be able to access satellite imagery as non-defence / non-strategic users in near-real-time.

See more details here:

http://www.esa.int/Our_Activities/Observing_the_Earth/Copernicus/Sentinel-2/First_Sentinel-2B_images_delivered_by_laser