Quec.li

everything quec.li

Microblogs

  • [PCMag.com: Tech Commentary] The Sound and the Fury of 'Fake' Engine Sounds: Purists complain, but actual engine sounds going the way of the manual transmission is just evolution.
  • [Reuters: Market News] UPDATE 2-ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport": PARIS, June 25 (Reuters) - London's financial centre will lose its prized "EU passport" if Britain fails to secure continued access to the bloc's single market in its exit talks, ECB Governing...
  • [World: World News, International News, Foreign Reporting - The Washington Post] Attendees at Asian bank meeting cite value of cooperation: South Korea?s deputy prime minister has called on governments to show the value of international cooperation as a Chinese-led Asian infrastructure investment bank held its first annual meeting following Britain?s vote to leave the European Union.
  • [War Zones: War News, Coverage, Analysis & More - The Washington Post] Attendees at Asian bank meeting cite value of cooperation: South Korea?s deputy prime minister has called on governments to show the value of international cooperation as a Chinese-led Asian infrastructure investment bank held its first annual meeting following Britain?s vote to leave the European Union.
  • [Reuters: World News] Britain pressured for quick EU split as Brexit impact begins: LONDON (Reuters) - Britain was under pressure on Saturday to set out a quick timetable for a divorce from the European Union after the country's historic vote to leave the bloc sent shockwaves around the world.
  • [Reuters: Sports News] All England grass a tonic for Tomic: (Reuters) - Australia's Bernard Tomic thinks he is playing some of the best grasscourt tennis of his career and is in a good place off the court as he heads into the Wimbledon championships main draw for the seventh time.
  • [Reuters: Energy] ChemChina to take 40 pct stake in Rosneft's petrochemical project: MOSCOW, June 25 (Reuters) - Russia's biggest oil producer Rosneft said on Saturday that China National Chemical Corporation (ChemChina) would take a 40 percent stake in its planned petrochemical complex VNHK in Russia's Far East.
  • [Hacker News] Lollicam is looking for VP of Partnership and Biz dev: Comments
  • [Reuters: Bonds News] UPDATE 1-ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport": PARIS, June 25 (Reuters) - Talks on Britain leaving the European Union must be carried out quickly to limit uncertainty, ECB Governing Council member Francois Villeroy de Galhau said on Saturday,...
  • [Reuters: Regulatory News] UPDATE 1-ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport": PARIS, June 25 (Reuters) - Talks on Britain leaving the European Union must be carried out quickly to limit uncertainty, ECB Governing Council member Francois Villeroy de Galhau said on Saturday,...
  • [Reuters: Market News] France presses for quick EU divorce with Britain, Germany cautious: BERLIN, June 25 (Reuters) - France's foreign minister called on Saturday for the European Union to move ahead quickly to seal the terms of a British exit from the bloc, arguing that the other 27...
  • [Reuters: Bonds News] France presses for quick EU divorce with Britain, Germany cautious: BERLIN, June 25 (Reuters) - France's foreign minister called on Saturday for the European Union to move ahead quickly to seal the terms of a British exit from the bloc, arguing that the other 27...
  • [Reuters: Market News] ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport": PARIS, June 25 (Reuters) - Brexit talks must be carried out quickly to limit uncertainties, ECB Governing Council member Francois Villeroy de Galhau said on Saturday, adding the City of London...
  • [Reuters: Bonds News] ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport": PARIS, June 25 (Reuters) - Brexit talks must be carried out quickly to limit uncertainties, ECB Governing Council member Francois Villeroy de Galhau said on Saturday, adding the City of London...
  • [Reuters: Regulatory News] ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport": PARIS, June 25 (Reuters) - Brexit talks must be carried out quickly to limit uncertainties, ECB Governing Council member Francois Villeroy de Galhau said on Saturday, adding the City of London...
  • [Reuters: World News] Debris in Tanzania to be examined for link to missing MH370 - report: KUALA LUMPUR (Reuters) - A new piece of debris found in Tanzania will be examined for a possible link to the missing Malaysia Airlines flight MH370, Malaysian state news agency Bernama cited the country's transport minister as saying on Saturday.
  • [Reuters: Market News] Debris in Tanzania to be examined for link to missing MH370 -report: KUALA LUMPUR, June 25 (Reuters) - A new piece of debris found in Tanzania will be examined for a possible link to the missing Malaysia Airlines flight MH370, Malaysian state news agency Bernama cited...
  • [Reuters: Market News] INSIGHT-As Cameron loses biggest gamble, Johnson looks biggest winner: LONDON, June 24 (Reuters) - It was David Cameron's biggest gamble and he was convinced he would win. Now, the British leader's closest rival - in the EU referendum, in the Conservative Party and in...
  • [Reuters: US Dollar Report] INSIGHT-As Cameron loses biggest gamble, Johnson looks biggest winner: LONDON, June 24 (Reuters) - It was David Cameron's biggest gamble and he was convinced he would win. Now, the British leader's closest rival - in the EU referendum, in the Conservative Party and in...
  • [Hacker News] Series of books diving deep into the core mechanisms of the JavaScript language: Comments
  • Show more…

Photos

  • China cuts contact with Taiwan liaison body over Tsai

    Beijing said Saturday it had cut off contact with the main Taiwan liaison body because of President Tsai Ing-wen?s refusal to endorse the concept of a single Chinese nation, ratcheting up pressure on the new Taiwanese leader.

  • Markets reel as world absorbs shock of UK vote for Brexit

    Britain has jumped. Now it is wildly searching for the parachute.

  • Diplomats from EU?s founding 6 meet in Berlin to talk Brexit

    Top diplomats from the European Union?s six founding nations met in Berlin on Saturday for hastily arranged talks following Britain?s stunning vote to leave the bloc.

  • Brexit: A modern-day Peasants' Revolt?

    A journalist invokes a grand historic metaphor of the 1381 Peasants' Revolt.

  • China cuts contact with Taiwan liaison body over Tsai

    Beijing said Saturday it had cut off contact with the main Taiwan liaison body because of President Tsai Ing-wen?s refusal to endorse the concept of a single Chinese nation, ratcheting up pressure on the new Taiwanese leader.

  • Markets reel as world absorbs shock of UK vote for Brexit

    Britain has jumped. Now it is wildly searching for the parachute.

  • Diplomats from EU?s founding 6 meet in Berlin to talk Brexit

    Top diplomats from the European Union?s six founding nations met in Berlin on Saturday for hastily arranged talks following Britain?s stunning vote to leave the bloc.

  • Brexit: A modern-day Peasants' Revolt?

    A journalist invokes a grand historic metaphor of the 1381 Peasants' Revolt.

  • On Brexit and immigration ruling, Libertarian presidential hopeful swerves

    Gary Johnson is siding generally with Republicans on the meaning of Brexit, while sounding a bit like Democrats on the Supreme Court's decision to maintain a stay on President Obama's order to allow many undocumented immigrants to avoid deportation.

  • The Daily Trail: Does Brexit give Donald Trump a boost?

    The early takes are in.

  • Show more…

Entries

  • iPhone 7 will get a larger camera, according to spy shot (1395 characters)

    Sat, 25 Jun 2016 06:02:00 -0400iPhone 7 will get a larger camera, according to spy shotEngadget RSS Feed

    Another week, another iPhone 7 leak. (Hey, it rhymes!) Following the set of components allegedly showing dual-SIM support, up to 256GB of storage and a 3.5mm headphone jack on the next iPhone, Chinese repair shop Rock Fix is back with a photo of what it claims to be the 4.7-inch iPhone 7's rear casing. Most notably, there are fewer plastic antenna bands here, and the main camera is said to feature a larger CMOS sensor -- here's hoping this will offer larger pixel sites to boost light sensitivity. What's interesting is that contrary to WSJ's report earlier this week, Rock Fix reiterated that the headphone jack is here to stay on the 4.7-inch version, but there's no word on whether the same applies to the 5.5-inch Plus model. We certainly hope that's the case.

    Rock Fix added that we should expect the 4.7-inch iPhone 7 to arrive in two flavors: One being a base model to replace the aging iPhone 6 (don't worry, we were told it won't be a plastic rehash), with the other being the one we're looking at here. This leaves us with the iPhone 7 Plus which is expected to feature the dual-lens camera we saw last time. Both sizes will apparently have dual-SIM slots, which is a common feature in competitive markets like China and India. If true, this move will hopefully give Apple a much needed boost after its recent iPhone sales decline.

    Source: Rock Fix (Sina Weibo)

  • Palestinian president apologizes for anti-Semitic comments (253 characters)

    Sat, 25 Jun 2016 05:29:13 -0400Palestinian president apologizes for anti-Semitic commentsWorld: World News, International News, Foreign Reporting - The Washington Post

    Palestinian President Mahmoud Abbas walked back comments he made in the European parliament on Thursday that a rabbi had called on the Israeli government to poison Palestinian water and apologized for offending Jews worldwide with an anti-Semitic trope.

  • Palestinian president apologizes for anti-Semitic comments (253 characters)

    Sat, 25 Jun 2016 05:21:59 -0400Palestinian president apologizes for anti-Semitic commentsWar Zones: War News, Coverage, Analysis & More - The Washington Post

    Palestinian President Mahmoud Abbas walked back comments he made in the European parliament on Thursday that a rabbi had called on the Israeli government to poison Palestinian water and apologized for offending Jews worldwide with an anti-Semitic trope.

  • UPDATE 1-ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport" (280 characters)

    Sat, 25 Jun 2016 04:28:00 -0400UPDATE 1-ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport"Reuters: Financials

    PARIS, June 25 (Reuters) - Talks on Britain leaving the European Union must be carried out quickly to limit uncertainty, ECB Governing Council member Francois Villeroy de Galhau said on Saturday, adding London's financial centre was at risk of losing its prized "EU passport".

  • ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport" (261 characters)

    Sat, 25 Jun 2016 04:12:00 -0400ECB's Villeroy: Brexit talks must be quick, City of London at risk of losing "EU passport"Reuters: Financials

    PARIS, June 25 (Reuters) - Brexit talks must be carried out quickly to limit uncertainties, ECB Governing Council member Francois Villeroy de Galhau said on Saturday, adding the City of London financial centre was at risk of losing its prized "EU passport".

  • Debris in Tanzania to be examined for link to missing MH370 -report (259 characters)

    Sat, 25 Jun 2016 04:06:00 -0400Debris in Tanzania to be examined for link to missing MH370 -reportReuters: Industrials

    KUALA LUMPUR, June 25 (Reuters) - A new piece of debris found in Tanzania will be examined for a possible link to the missing Malaysia Airlines flight MH370, Malaysian state news agency Bernama cited the country's transport minister as saying on Saturday.

  • Debris in Tanzania to be examined for link to missing MH370 -report (259 characters)

    Sat, 25 Jun 2016 04:06:00 -0400Debris in Tanzania to be examined for link to missing MH370 -reportReuters: Company News

    KUALA LUMPUR, June 25 (Reuters) - A new piece of debris found in Tanzania will be examined for a possible link to the missing Malaysia Airlines flight MH370, Malaysian state news agency Bernama cited the country's transport minister as saying on Saturday.

  • Updated Tripod Recommendations ? (690 characters)

    Sat, 25 Jun 2016 04:01:00 -0400Updated Tripod Recommendations ?Stuck in Customs

    Updated Tripod Recommendations

    See more over on the Camera Equipment page!

    I’ve recently switched tripods, then switched back, then switched again. I’m like the Caitlyn Jenner of tripods, and I’m not proud. But I’m ownin’ it girl.

    • High End ? The TQC-14 Tripod from RRS – I love this tripod. Again, I’ve switched around a lot… but this thing honestly fixes all the gripes I had with previous RRS tripods.
    • Budget ? Any 3-Legged Thing Tripod – These are also nice tripods. Yes, they are still pricey but with good quality. There are some very inexpensive tripods out there, but they are so flimsy and you should not waste your time.
  • INSIGHT-As Cameron loses biggest gamble, Johnson looks biggest winner (251 characters)

    Sat, 25 Jun 2016 04:00:00 -0400INSIGHT-As Cameron loses biggest gamble, Johnson looks biggest winnerReuters: Cyclical Consumer Goods

    LONDON, June 24 (Reuters) - It was David Cameron's biggest gamble and he was convinced he would win. Now, the British leader's closest rival - in the EU referendum, in the Conservative Party and in the country - is the frontrunner to take his job.

  • Today at Colette!!! (567 characters)

    Sat, 25 Jun 2016 03:55:00 -0400Today at Colette!!!The Sartorialist

     

    TODAY FROM 4-6PM!!

     

    I’ll be at colette Paris to introduce my new sneaker collection for Sutor Mantellassi

     

    It’s such an honor to have my sneakers in the window at colette Paris

     

    I’ve stated many times before that, to me, Colette has defined cool for almost 20 years, so to have had an exhibit, book signings and now one of my designs recognized and approved by her critical eye is quite gratifying.

     

    Ps we will also have women’s sizes of the sneakers available in store or by special order!

     

     

  • Wall Street eyes low rates, earnings after Brexit rout (258 characters)

    Sat, 25 Jun 2016 03:51:00 -0400Wall Street eyes low rates, earnings after Brexit routReuters: Business News

    (Reuters) - With markets reeling after Britain's vote to leave the European Union, some on Wall Street expect cooler heads to prevail over the next several sessions as investors focus domestically on the outlook for the U.S. economy and company earnings.

  • Brexit baffled punters, pundits and fund managers to the very end (260 characters)

    Sat, 25 Jun 2016 03:48:00 -0400Brexit baffled punters, pundits and fund managers to the very endReuters: Business News

    BOSTON (Reuters) - Nearly everyone, from London gamblers to U.S. money managers got it wrong. Britain's vote to leave the European Union shocked pundits, investors and politicians alike, underscoring the inherent difficulty of forecasting such rare events.

  • Sweden Tests World's First Electric Road For Trucks (1128 characters)

    Sat, 25 Jun 2016 03:00:00 -0400Sweden Tests World's First Electric Road For TrucksSlashdot

    Kristine Lofgren writes: Electric vehicles are cool, but for industrial vehicles it can be a challenge to get very far on just electric power. That's why Sweden is testing out an electric road where e-vehicles can jump on, get juiced while they travel, and get back on the road. The country just opened a two kilometer test stretch in Sandviken on the E16 where electric vehicles can connect to an overhead system that is very similar to light rail. It's another exciting step towards a fossil fuel-free Sweden. Trucks can use the electric power while riding on the special electric road system -- on regular roads they operate as hybrid vehicles. The testing is scheduled to take place until 2018, which should give the country enough time to see how the technology functions in the real world. Sweden's energy and sustainable growth agencies will fund the project in addition to the transport administration.

    Read more of this story at Slashdot.

  • LEAKED :: First Image of the New FUJIFILM Instax Share SP-2 Smartphone Printer :: Price ? $199 (396 characters)

    Sat, 25 Jun 2016 02:42:00 -0400LEAKED :: First Image of the New FUJIFILM Instax Share SP-2 Smartphone Printer :: Price ? $199Fuji Rumors

  • Photo editing masterclass: How to make localised adjustments to contrast (307 characters)

    Sat, 25 Jun 2016 02:12:00 -0400Photo editing masterclass: How to make localised adjustments to contrastAmateur Photographer Equipment Reviews

    Photoshop guru Martin Evening sorts out your photo-editing and post-processing problems. Here he discusses how apply localised adjustments to contrast.

    Photoshop guru Martin Evening sorts out your photo-editing and post-processing problems. Here he discusses how apply localised adjustments to contrast.
  • Jamal Moir: Creating Map Visualisations in Python with Basemap (11749 characters)

    Sat, 25 Jun 2016 02:01:00 -0400Jamal Moir: Creating Map Visualisations in Python with BasemapPlanet Python


    When doing a bit of good old data exploration and analysis you'll often want ways of visually representing this data. It helps you understand what you're working with, and allows you to present your exciting new discoveries to other people in easy-to-digest formats that even the data illiterate can understand (if those people even exist now-a-days).

    Some data has a location associated with them. Things like per city/country populations or general election votes and the like can be bound to a location somewhere. If you have data like this then being able to plot, or represent this data somehow on a map can be of massive help. It allows you to spot trends in areas and visually recognise groups in your data as well as being a fantastic method of communicating your results to people.

    If you are doing your data analysis in Python, then lucky you; representing your data on a map is a fairly simple task. In this post we will go into just how we do this and by the end will have a pretty little map to communicate our data to the masses.

    To follow along with this post, you should have basic knowledge of Pandas and Matplotlib, but if you don't, don't worry because you can go and check out my Pandas and Matplotlib tutorials to learn everything you need for this post and more.


    THE TOOL OF THE TRADE - BASEMAP

    The tool that we will be using to create our map visualisation is Matplotlib Basemap. Now this tool is actually not part of the Matplotlib package, so you'll have to install it separately.

    I hope for your sake that you are using Anaconda; if you are you can simply run the command conda install basemap. If you are not using Anaconda, then you are going to have to spend a bit of time manually installing it. You can find information on how to manually install Basemap here.


    DRAWING A BASIC MAP

    OK! Now we have Basemap installed and ready to use, we can get going and draw our first map. To draw a map in Basemap you first need to know a few things:
    • Where you want your map to be centred
    • The latitude and longitude of the lower left corner of the bounding box around the area you want to map.
    • The latitude and longitude of the upper right corner of the bounding box around the area you want to map.
    • Instead of the corners of the bounding box you can also use the width and height of the area you want to map in metres.
    Now you may be wondering 'how hell am I supposed to know all that stuff?'. Well, I've got you covered there. 

    First go to this very useful website and you will be presented with a world map. In the top left corner of the map there is a button with a cursor icon on, click that and draw a box around the area you want to map.



    At the bottom there is a box with some longitude and latitudes in. To the left of that there is a drop down menu, click that and select DublinCore; this is the easiest format to understand in my opinion and it's in a form that can be directly used in Basemap. The first two numbers labeled 'westlimit' and 'southlimit' are the latitude and longitude of your lower left corner. The other two, labelled 'eastlimit' and 'northlimit' are the latitude and longitude of your upper right corner.


    Now we have the information we need to be able to draw our map, we can get to writing some code and actually producing a basic map. Now note that in this post the data I will be using to plot points and such on a map is the 2015 England and Wales Property prices and so I will be drawing the UK. I will provide links to all the data I used in this visualisation, but by all means use your own and make a completely different map. In fact, I recommend you do!

    First we will import the packages that we will be using.

    import matplotlib.pyplot as plt
    import matplotlib.cm

    from mpl_toolkits.basemap import Basemap
    from matplotlib.patches import Polygon
    from matplotlib.collections import PatchCollection
    from matplotlib.colors import Normalize

    Next we will create a figure to draw our map on and set its size.

    fig, ax = plt.subplots(figsize=(10,20))

    We can create our map with the below code.

    m = Basemap(resolution='c', # c, l, i, h, f or None
    projection='merc',
    lat_0=54.5, lon_0=-4.36,
    llcrnrlon=-6., llcrnrlat= 49.5, urcrnrlon=2., urcrnrlat=55.2)

    Now, there are a fair amount of arguments here, but they are all pretty easy to understand. The 'resolution' argument is the quality of the map you are creating. The options are crude, low, intermediate, high or full. The higher the resolution the longer it takes to render the map, and it can take a very long time so I recommend that while you are working on your map, set it to crude, and then if and when you want to publish it set it to full.

    The 'projection' is the type of map that you want to draw. There are lots of types that you can use that all have different use cases so I recommend you take a look at the available ones here.

    The 'lat_0' and 'lon_0' are the latitude and longitude of the centre point of your map. The other arguments are the latitudes and longitudes of your bounding box corners. 'llcrnr' stands for 'lower left corner' and 'urcrnr' stands for upper right corner. Fill these in with the latitudes and longitudes that you got earlier.

    Now we just need to define how the map is to be displayed and we have our basic map.
    m.drawmapboundary(fill_color='#46bcec')
    m.fillcontinents(color='#f2f2f2',lake_color='#46bcec')
    m.drawcoastlines()

    With the drawmapboundary() function we can set the colour of the seas and oceans on our map. Here I have set it to a light blue colour. The fillcontinents() function does just as it suggests, this is the colour of land masses. I have set them to a light-grey colour and have set lakes to the same colour as I set the sea. Finally the drawcoastlines() function draws lines around the land masses.

    You should now have a map looking a bit like this. Obviously the area will be different if you chose a different place and the colours will vary too if you changed those. Also note that this map has been drawn using the crude setting.



    PLOTTING DATA POINTS ONTO A MAP

    We now have our map, but what we really want to do is to use it to communicate our data, so let's plot some points on it.

    Now as mentioned before I will be using England and Wales property price data. You can download this data here. I also have done a bit of data analysis and manipulation on this that you will also need to do if you want to produce the same map as me. I'm not going to go into what I did here as it doesn't fit the scope of this post, but the notebook that I did this all in can be found here. I will be plotting newly built houses.

    Plotting points onto a Basemap map is very easy. A few things to note about the below code though, are that my data is stored in a Pandas DataFrame called new_areas, the location of these areas are in new_areas.pos and the number of newly built houses in that area is in new_areas.count.

    def plot_area(pos):
    count = new_areas.loc[new_areas.pos == pos]['count']
    x, y = m(pos[1], pos[0])
    size = (count/1000) ** 2 + 3
    m.plot(x, y, 'o', markersize=size, color='#444444', alpha=0.8)

    new_areas.pos.apply(plot_area)

    What we are doing here is making a function that takes a position and then plots the number of new houses associated with that position onto our map represented by the size of the point. Then using apply() on our Pandas DataFrame's pos column we go through every position in our DataFrame and plot them onto our map.

    You should end up with something along the lines of this:


    Don't worry about the points in the sea, that's just because on a crude map the shape is not perfect. When we finish up and render our map with full resolution they will be safely on land.

    USING SHAPEFILES TO DRAW AREAS AND REGIONS

    Now we have a map that can transmit information, but what if we want to represent regions or specific areas on our map. For example in the we have UK counties or in the USA, states. We can do this using shapefiles. I will be drawing in England and Wales postcode boundaries using the shapefile which can be found here.

    This is actually just a one-liner; nice and simple.

    m.readshapefile('data/uk_postcode_bounds/Areas', 'areas')

    The first argument is the path to your shapefile. The second is the name that will be used to access your shapefile. Here I will be able to access the data from the shapefile using m.areas.

    You should now have a map like this:


    Again, don't worry about the shapefile not matching up with the map, it's because we have the map's resolution set to crude.


    USING DATA TO COLOUR IN AREAS

    Now we have areas drawn onto our map, wouldn't it be nice to be able to use our data to colour them in. For example in my case, the higher the number of new houses in an area, the darker the colour of the area. We'll also add a colour bar in to give people looking at the map an idea of what kind of number a colour represents.

    First we are going to create a new DataFrame for convenience that will hold all the information we need.

    df_poly = pd.DataFrame({
    'shapes': [Polygon(np.array(shape), True) for shape in m.areas],
    'area': [area['name'] for area in m.areas_info]
    })
    df_poly = df_poly.merge(new_areas, on='area', how='left')

    Here we are getting the polygons from our shapefile that we imported earlier. Also, my shapefile contained the names of each area too, which we also add to the new DataFrame. We then merge the the two DataFrames on the area column which adds the other information about the areas that we need.

    Next we need to use this information to colour in the areas.

    cmap = plt.get_cmap('Oranges')   
    pc = PatchCollection(df_poly.shapes, zorder=2)
    norm = Normalize()

    pc.set_facecolor(cmap(norm(df_poly['count'].fillna(0).values)))
    ax.add_collection(pc)

    First we create a colormap to use with our map and data. I like orange so that's what I'm going to go with, you can find other colormaps here.

    We then create a PatchCollection using the shapes from our shapefile which are now stored in the DataFrame that we previously made. The 'zorder' argument just makes sure that the patches that we are creating end up on top of the map, not underneath it.

    Next for convenience we create a variable for the function Normalize() which we then use when setting the PatchCollections facecolor. We colour the patches with our colormap that we created before and pass it our normalised new houses count data. This makes it so that now patches with high new property counts are a darker colour than those with low new property counts.

    Finally we add the PatchCollection to our map.

    That's it, we now have a map that uses our data to colour in areas. There is one more thing that we should do however. Add a colorbar, this makes it at lot easier to interpret the colours of the map and relate them to a number.

    mapper = matplotlib.cm.ScalarMappable(norm=norm, cmap=cmap)

    mapper.set_array(df_poly['count'])
    plt.colorbar(mapper, shrink=0.4)

    First we create a ScalarMappable object and use the set_array() function to add our counts to it. We then pass it to Matplotlib's colorbar() function and set the shrink argument to 0.4 in order to make the colorbar smaller than the map and we are done.

    Change the maps resolution to 'f' for full and you should now have a attractive and informative map visualisation written in Python with Matplotlib and Basemap that will look something like this:



    To see all this code together in action, you can go here.

    Remember to share this post so that other people can read it too and to subscribe to this blogs mailing list, follow me on twitter and add me on Google+ so you don't miss any useful posts!

    Also, if you make or have made a map please by all means comment on this post with a link to wherever we can find it, I'd love to see what other people come up with.
  • Brexit baffled punters, pundits and fund managers to the very end (269 characters)

    Sat, 25 Jun 2016 01:00:00 -0400Brexit baffled punters, pundits and fund managers to the very endReuters: Financials

    BOSTON, June 25 (Reuters) - Nearly everyone, from London gamblers to U.S. money managers got it wrong. Britain's vote to leave the European Union shocked pundits, investors and politicians alike, underscoring the inherent difficulty of forecasting such rare events.

  • Rocky Dawuni Launches New Website Announcing 2016 European Summer Tour (440 characters)

    Sat, 25 Jun 2016 00:00:00 -0400Rocky Dawuni Launches New Website Announcing 2016 European Summer TourArts & Entertainment: Web sites / Internet

    <p>GRAMMY &#174; Nominated Afro Roots musician, Rocky Dawuni, will embark on his ?Branches of the Same Tree? Summer 2016 European Tour and launches a new website.</p><p>(PRWeb June 25, 2016)</p><p>Read the full story at <a href="http://www.prweb.com/releases/2016/06/prweb13507235.htm" rel="nofollow">http://www.prweb.com/releases/2016/06/prweb13507235.htm</a></p>

  • Leading U.S. Company and Dutch University Partner on Digital Heritage... (399 characters)

    Sat, 25 Jun 2016 00:00:00 -0400Leading U.S. Company and Dutch University Partner on Digital Heritage...Arts &amp; Entertainment: Web sites / Internet

    <p>HistoryIT to provide Utrecht University?s Media and Culture Studies Expertise Centre with hands-on digital heritage projects</p><p>(PRWeb June 25, 2016)</p><p>Read the full story at <a href="http://www.prweb.com/releases/2016/06/prweb13510338.htm" rel="nofollow">http://www.prweb.com/releases/2016/06/prweb13510338.htm</a></p>

  • Show more…

Media

  • Holliston Police's K9 Cesh Tracks Suspect, Leads to Arrest for Assault, Robbery

    K9 Cesh helped out the Ashland Police Department track down a suspect.

  • License Plate Lottery Open|Bicyclist Struck Door of Parked Car Before Fatal Crash|Embattled Principal Transferred: PM Digest

    Also: Beach remains ID'd two years later; Four from MA arrested in NH drug sweep; JFK letter to alleged mistress fetches absurd price; More.

  • Sorry Your Yard's Looking Like a Triscuit: Holliston-Hopkinton's Weekend Weather Another Sunny One

    It's another beauty for the beach and getting outside, but gardeners aren't necessarily happy about it.

  • Softkinetic CARlib

  • Find Open Houses in Holliston and Hopkinton This Weekend

    Start with this updated list from Zillow.

  • Sunset Jazz Returns to Hopkinton Center for the Arts

    The series will run July 2 through August 6.

  • Boston Plans Event For Immigrants, Families Impacted by Supreme Court Decision

    The City of Boston will host an event that offers legal consultation for those impacted by ruling on DAPA, expanded DACA.

  • Mass. Democrats' Sit-in Ends After 26 Hours, But No Gun Vote

    All of Massachusetts' elected congressmen - and both its senators - participated in the overnight protest.

  • House Speaker Foils Democrats' Sit-in; No Gun Legislation Vote

    Several Massachusetts congressmen continue to "hold the floor" Thursday morning after nearly 24 hours.

  • House Speaker Foils Democrats' 15-Hour Sit-in; No Gun Legislation Vote

    All nine Massachusetts congressmen and both Senators tried to "hold the floor" Wednesday.

  • Show more…