Greggs upgrades profit forecast as sales increase
by Jessica ClarkGreggs has upgraded its profit expectations for the year after the bakery chain reported boosted sales.
Total sales were up 12.4 per cent in the six weeks to 9 November while like-for-like sales in company managed shops increased 8.3 per cent.
Read more: Greggs cooking up vegan versions of popular products
In a trading update this morning Greggs, which has 2,000 stores across the UK, said it now anticipates 2019 full-year profit before tax, excluding exceptional charges, to be higher than previous expectations.
“Sales growth continues to be driven by increased customer visits and has been stronger than we had expected given the improving comparative sales pattern that we saw in the fourth quarter last year,” the company said in a statement today.
“Operational costs remain well controlled and, whilst the comparative sales become stronger still in the balance of the year, the Board now anticipates that full year underlying profit before tax (excluding exceptional charges) will be higher than our previous expectations.”
Retail analyst Nick Bubb said: “Weak footfall may be a problem for many High Street retailers, but Greggs is having no problem in pulling in customers and today’s unscheduled update flags that the business is still on a roll.”
Read more: Greggs shares are on fire, but can it last?
Last month the bakery company reported that growth slowed to 12.4 per cent in the third quarter due to strong comparatives in the previous year.
Like-for-like sales increased 7.4 per cent in the 13 weeks to 28 September, down from 10.5 per cent in the first half of the year.
Main image credit: Getty


Below you will find additional newsletters, videos, and Mission Network News spots for our various project.


Privacy Policy
What type of data is collected?
Detail on our third-party providers are below. We do not collect, use, or retain personal information of any kind. Specifically,:
- We do NOT use cookies
- We do NOT use any third-party analytics tools or plug-ins
- We do NOT log/track your specific address or lat/long location information (however, we DO track the city, county, and state that users are querying for to help prioritize our drop box/early voting location research efforts)
- We do NOT use unique user identifiers on sites across the web
- No tricks, no gotchas, no exceptions
- If you deliberately provide personally identifiable information (PII) to us (for example, when you contact us via email), we will not use that information in any way without your consent other than to respond to you in the way you requested
What type of third-party services are used on the site and how do they use my data?
Microsoft is our hosting/infrastructure provider and they may collect typical server log information, consistent with their privacy policy, including:
- URL requested on our domain
- Referring URL
- IP address (anonymized)
- Browser, language, and operating system used
- Time and date
- Typical browser information, such as URL, title, and related metadata.
We use a third-party service called AddToAny to create our social sharing buttons
- Their privacy policy is here
We use Google for mapping and address autocomplete
- Their privacy policy is here


Butter Chicken. Kali Mirch Chicken. Kadhai Chicken. Santusti Special Chicken
Shahi Paneer. Kadhai Paneer. Paneer Buttur Masala. Kali Mirch Special Paneer.
Chinese Momo, Noodels, Fried Rice, Chicken Rice, Chili Potato, Chicken & Veg Rol
Buttur Naan, Daal Fried, Palak Paneer, Egg Bhurji, Rajma Rice etc.
— Our Customers.
Be the first to know about the new Dishes & Offers


scrot- Capture a screenshot and save it as `capture.png`:
scrot capture.png- Capture a screenshot interactively:
scrot --select- Capture a screenshot from the currently focused window:
scrot --focused- Display a countdown of 10 seconds before taking a screenshot:
scrot --count --delay 10


| Home | About us | Where We're Located | Hot Drinks | Pastries | Cakes | Cookies | Catering |
|---|
Please ask one of our talented bakers for a personlized cake for parties and birthdays
| Cake | 6 inch | 12 inch |
|---|---|---|
| Strawberry Shortcake | 7.00 | 10.50 |
| Lemon | 7.00 | 10.50 |
| Choclate | 6.50 | 8.00 |
| Vanilla | 6.00 | 8.00 |
| Carrot | 7.50 | 12.00 |
| Red Velvet | 7.00 | 9.00 |


{border-style CCHF px;} #ffffff;} index Crimean–Congo case cases contact fever patient haemorrhagic Case transmission healthcare nosocomial visitors days hemorrhagic px; workers {font-family Research Training fever, font-size patients bodily care diagnosis double; -year-old Infect Nosocomial border-color border-width hospitalised infected nurse patient’s percutaneous reported ribavirin room secondary solid; use {font-style {font-weight Ankara Clinical Dis. Diseases Hospital, Infectious Reference blood bold courier; diagnosed different em; health oral personal pt;} virus


16.3 Implementation and Analysis of
Minimum Spanning Trees
To compute a
minimum spanning tree for an undirected, weighted graph, we
first need a way to represent weighted graphs using the basic
abstract datatype for graphs presented in Chapter
11. We also need a way to keep track of the information
that Prim's algorithm requires for vertices and edges. This is
the point of the MstVertex structure; it is
used for vertices in graphs for which we plan to compute
minimum spanning trees (see Example
16.2). The structure consists of five members:
data is the data associated with the vertex,
weight is the weight of the edge incident to
the vertex, color is the color of the vertex,
key is the key value of the vertex, and
parent is the parent of the vertex in the
minimum spanning tree.
Building a graph of MstVertex
structures is nearly the same as building a graph containing
other types of data. To insert a vertex into the graph, we
call graph_ins_vertex and pass
an MstVertex structure for
data. Similarly, to insert an edge, we call
graph_ins_edge and pass
MstVertex structures for data1
and data2. When we insert a vertex, we set
only the data member of the
MstVertex structure. When we insert an edge,
we set the data member of
data1, and the data and
weight members of data2. In
data2, the weight member is
the weight of the edge from the vertex represented by
data1 to the vertex represented by
data2. In practice, weights are usually
computed and stored as floating-point numbers. Since key
values are computed from the weights, these are floating-point
numbers as well.
The mst
operation begins by initializing every vertex in the list of
adjacency-list structures. We set the initial key value of
each vertex to DBL_MAX, except the start
vertex, whose key value is set to 0.0. Recall that in the
graph abstract datatype, a graph was represented as a list of
adjacency-list structures, each of which contained one vertex
and a set of vertices adjacent to it (see Chapter
11). We use the vertex stored in each adjacency-list
structure to maintain the color, key value, and parent of the
vertex. The point of maintaining this information in the list
of adjacency-list structures, as opposed to vertices in the
adjacency lists themselves, is that we can keep it in one
place. Whereas a single vertex may appear in numerous
adjacency lists, each vertex appears in the list of
adjacency-list structures exactly once.
At the center of Prim's algorithm is a single
loop that iterates once for each vertex in the graph. We begin
each iteration by selecting the vertex that has the smallest
key value among the white vertices. We color this vertex black
where it resides in the list of adjacency-list structures.
Next, we traverse the vertices adjacent to the selected
vertex. As we traverse each vertex, we look up its color and
key value in the list of adjacency-list structures. Once we
have located this information, we compare it with the color
and key value of the selected vertex. If the adjacent vertex
is white and its key value is less than that of the selected
vertex, we set the key value of the adjacent vertex to the
weight of the edge between the selected vertex and the
adjacent vertex; we also set the parent of the adjacent vertex
to the selected vertex. We update this information for the
adjacent vertex where it resides in the list of adjacency-list
structures. We then repeat this process until all vertices
have been colored black.
Once the main loop in Prim's algorithm
terminates, we are finished computing the minimum spanning
tree. At this point, we insert each black
MstVertex structure from the list of
adjacency-list structures into the linked list
span. In span, the vertex
whose parent is set to NULL is the vertex at the root of the
minimum spanning tree. The parent member of
every other vertex points to the vertex that precedes it in
the span. The weight member of each
MstVertex structure is not populated because
it is needed only for storing weights in adjacency lists. Figure
16.2 shows the list of MstVertex
structures returned for the minimum spanning tree computed in
Figure
16.1.
The runtime complexity of mst is O (EV
2), where V
is the number of vertices in the graph and E is the number of edges. This comes
from the main loop, in which we select vertices and compare
weights and key values. For each of the V vertices we select, we first
traverse V elements in the list
of adjacency-list structures to determine which white vertex
has the smallest key value. This part of the main loop is
O (V
2) overall. Next, for each vertex adjacent
to the vertex we select, we consult the list of adjacency-list
structures for information about whether to change its key
value and parent. Over all V
vertices, the list is consulted E times, once for each of the E edges in all of the adjacency lists
together. Each of these consultations requires O (V ) time to search the list.
Therefore, for all V vertices
that we select, an O (V )
operation is performed E times.
Consequently, this part of the loop is O (EV 2), and the main loop
overall is O (V 2 + EV 2), or O (EV 2). Since the loops before
and after the main loop are O
(V ), the runtime complexity of mst is O
(EV 2).
However, recall that with a little improvement (discussed at
the end of the chapter), Prim's algorithm runs in O (E lg
V ) time.
Example 16.2.
Implementation for Computing Minimum Spanning Trees /*****************************************************************************
* *
* --------------------------------- mst.c -------------------------------- *
* *
*****************************************************************************/
#include <float.h>
#include <stdlib.h>
#include "graph.h"
#include "graphalg.h"
#include "list.h"
/*****************************************************************************
* *
* ---------------------------------- mst --------------------------------- *
* *
*****************************************************************************/
int mst(Graph *graph, const MstVertex *start, List *span, int (*match)(const
void *key1, const void *key2)) {
AdjList *adjlist;
MstVertex *mst_vertex,
*adj_vertex;
ListElmt *element,
*member;
double minimum;
int found,
i;
/*****************************************************************************
* *
* Initialize all of the vertices in the graph. *
* *
*****************************************************************************/
found = 0;
for (element = list_head(&graph_adjlists(graph)); element != NULL; element =
list_next(element)) {
mst_vertex = ((AdjList *)list_data(element))->vertex;
if (match(mst_vertex, start)) {
/***********************************************************************
* *
* Initialize the start vertex. *
* *
***********************************************************************/
mst_vertex->color = white;
mst_vertex->key = 0;
mst_vertex->parent = NULL;
found = 1;
}
else {
/***********************************************************************
* *
* Initialize vertices other than the start vertex. *
* *
***********************************************************************/
mst_vertex->color = white;
mst_vertex->key = DBL_MAX;
mst_vertex->parent = NULL;
}
}
/*****************************************************************************
* *
* Return if the start vertex was not found. *
* *
*****************************************************************************/
if (!found)
return -1;
/*****************************************************************************
* *
* Use Prim's algorithm to compute a minimum spanning tree. *
* *
*****************************************************************************/
i = 0;
while (i < graph_vcount(graph)) {
/**************************************************************************
* *
* Select the white vertex with the smallest key value. *
* *
**************************************************************************/
minimum = DBL_MAX;
for (element = list_head(&graph_adjlists(graph)); element != NULL; element
= list_next(element)) {
mst_vertex = ((AdjList *)list_data(element))->vertex;
if (mst_vertex->color == white && mst_vertex->key < minimum) {
minimum = mst_vertex->key;
adjlist = list_data(element);
}
}
/**************************************************************************
* *
* Color the selected vertex black. *
* *
**************************************************************************/
((MstVertex *)adjlist->vertex)->color = black;
/**************************************************************************
* *
* Traverse each vertex adjacent to the selected vertex. *
* *
**************************************************************************/
for (member = list_head(&adjlist->adjacent); member != NULL; member =
list_next(member)) {
adj_vertex = list_data(member);
/***********************************************************************
* *
* Find the adjacent vertex in the list of adjacency-list structures. *
* *
***********************************************************************/
for (element = list_head(&graph_adjlists(graph)); element != NULL;
element = list_next(element)) {
mst_vertex = ((AdjList *)list_data(element))->vertex;
if (match(mst_vertex, adj_vertex)) {
/*****************************************************************
* *
* Decide whether to change the key value and parent of the *
* adjacent vertex in the list of adjacency-list structures. *
* *
*****************************************************************/
if (mst_vertex->color == white && adj_vertex->weight <
mst_vertex->key) {
mst_vertex->key = adj_vertex->weight;
mst_vertex->parent = adjlist->vertex;
}
break;
}
}
}
/**************************************************************************
* *
* Prepare to select the next vertex. *
* *
**************************************************************************/
i++;
}
/*****************************************************************************
* *
* Load the minimum spanning tree into a list. *
* *
*****************************************************************************/
list_init(span, NULL);
for (element = list_head(&graph_adjlists(graph)); element != NULL; element =
list_next(element)) {
/**************************************************************************
* *
* Load each black vertex from the list of adjacency-list structures. *
* *
**************************************************************************/
mst_vertex = ((AdjList *)list_data(element))->vertex;
if (mst_vertex->color == black) {
if (list_ins_next(span, list_tail(span), mst_vertex) != 0) {
list_destroy(span);
return -1;
}
}
}
return 0;
} |


These Terms and Conditions (“T&C’s” or “Terms & Conditions”) govern your access to and use of this website https://www.srmist.edu.in operated by SRM Institute of Science and Technology.
This statement discloses the privacy practices for the websites of SRM Institute of Science and Technology located at SRM Nagar, Kattankulathur - 603 203 Chengalpattu District, Tamil Nadu. Any use of the website/(s) owned and managed by SRM Institute of Science and Technology shall be construed as your acceptance of this Privacy Policy and if you do not accept the Privacy Policy enumerated herein below, please do not proceed further to use/access the site.
What information do we collect?
We collect information from you when you register on our site, subscribe to our newsletter, respond to a survey or fill out a form. When ordering or registering on our site, as appropriate, you may be asked to enter your: name,
e-mail address, mailing address or phone number. You may, however, visit our site anonymously. The information about the user as collected by SRM Institute of Science and Technology falls into the following two categories:
1. Information supplied by users and
2. Information automatically tracked while navigation (Information).
Questions regarding this statement should be directed to SRM Institute of Science and Technology by contacting SRM Institute of Science and Technology, SRM Nagar, Kattankulathur - 603 203 Chengalpattu District, Tamil Nadu or by calling our main number at +91-44- 27417000, +91-44- 27417499.
To make use of certain features on our websites, visitors must provide certain information as part of the registration process. (We may ask, for example, for your name, email address, sex, age, and PIN code, and we might request information on your occupation, interests, and the like).
The information you supply will help us to make our website better by allowing us to tailor our site to suit your interests and make it more useful to you. Supplying such information is entirely voluntary. In some instances, which involve, for example, subscriptions or contests, you may need to provide all the information before the subscription can reach you.
Do we use cookies?
Cookies are small files that a site or its service provider transfers to your computer’s hard drive through your Web browser (if you allow) that enables the sites or service providers systems to recognize your browser and capture
and remember certain information.
We use cookies to help make our websites to be more responsive to the needs of our visitors. The cookies assign each visitor a unique, random number (a sort of user ID) that resides on their computer. The cookie merely identifies the computer that a visitor uses to access our sites.  The only personal information a cookie can contain is information you supply (an example of this is when you ask for our Personalized Newsletter/ Horoscope information). A cookie cannot read data off your hard drive. Our advertisers may also assign their own cookies to your browser (if you click on their ads), a process that we do not control.
The cookies further help to deliver a better service that is keyed to the interests of our visitors. We can build a better site if we know which pages our users are visiting and how often and we use cookies to avoid showing you the same ad, repeatedly, during a single visit.
If you do not want the benefit of cookies, there is a simple process to manually delete your cookies. Please consult your web browser’s Help documentation for more information on this process.
We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information. All information gathered on the SRM Institute of Science and Technology website is securely stored within the website controlled database. The database is stored on servers secured behind a firewall; access to the servers is password-protected and is strictly limited. However, as effective as our security measures are, no security system is impenetrable. We cannot guarantee the security of our database, nor can we guarantee that information you supply will not be intercepted while being transmitted to us over the Internet. And, of course, any information you include in a posting to the discussion areas is available to anyone with Internet access.
Occasionally, at our discretion, we may include or offer third party products or services on our website. These third party sites have separate and independent privacy policies. We therefore have no responsibility or liability for the content and activities
of these linked sites. Nonetheless, we seek to protect the integrity of our site and welcome any feedback about these sites.
We do not provide any personally identifiable information to third party websites / advertisers / ad-servers without your consent.
When we present information to our advertisers to help them understand our audience and confirm the value of advertising on our websites, it is usually in the form of aggregated statistics on traffic to various pages within our
sites. If you do register with our Website, we may, from time to time, contact you about content and features that we believe may be of interest to you.
What do we use your information for?
Any of the information we collect from you may be used in one of the following ways:
1. To personalize your experience (your information helps us to better respond to your individual needs)
2. To improve our website (we continually strive to improve our website offerings based on the information and feedback we receive from you)
3. To administer a contest, promotion, survey or other site feature
4. To send periodic emails
5. To measure traffic within our site and let advertisers know the geographic locations from where our visitors come.
The email address you provide may be used to send you information, respond to inquiries, and/or other requests or questions.
We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential.
We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential.
However, non-personally identifiable visitor information may be provided to third parties for marketing, advertising, or other uses.
This online privacy policy applies only to information collected through our website and not to information collected offline.
By using our site, you consent to our websites privacy policy.
If we decide to change our privacy policy, we will post those changes on this page. The Policy at the time of collection of such information will apply in the event of any changes/ amendments to the Privacy Policy.


Tropical Storm Sebastien strengthens, no land threat
by Associated PressMIAMI (AP) — Tropical Storm Sebastien has strengthened in the Atlantic but is expected to stay over open waters.
The storm’s maximum sustained winds Wednesday are 50 mph (80 kph). The U.S. National Hurricane Center says some slight strengthening is possible over the next 48 hours but Sebastien is expected to be absorbed by a cold front in a few days.
The storm is centered about 235 miles (378 kilometers) northeast of the Leeward Islands and is moving northwest near 8 mph (12.87 kph).


--- ---
We are bringing Casual ARMS into its next stage of life and we want all of YOU to help bring to life an official Casual ARMS mascot!
Over the next month, we will be accepting submissions of concept art for a Casual ARMS mascot in the #contest-submissions channel on the Discord server. Any art concepts submitted in that channel before December 31st, 11:59 PM Eastern Time will be judged by the CA administrative staff and a public vote!
We will have three winners: the winner of the popular vote, an honorable mention from our judges, and our GRAND PRIZE WINNER.
All three will receive one of the last remaining stock of our Casual ARMS wristbands. Our GRAND PRIZE WINNER will also receive a $10 eshop card and have their concept art selected for our new official mascot, to be used for future branding and promotional art!
All credit for the winning mascot design will be given to the original artist. By submitting, you grant Casual ARMS rights to use your mascot design in any future logos, promotional banners, and other community graphics if you are selected as a winner. The winner will be contacted via DM on Discord.
We are looking for a mascot to represent the Casual ARMS community featuring these qualities:
All submissions must follow our usual community guidelines (see the #welcome channel on Discord).
Art does not have to be final. We are looking for a CONCEPT! Ideas can be fully realized digital illustrations or sketches on notebook paper. Anyone can submit up to three entries.
{% include footer.html %}


schumaker: Schumaker Shape-Preserving Spline
This is a shape preserving spline <doi:10.1137/0720057>
which is guaranteed to be monotonic and concave or convex if the
data is monotonic and concave or convex. It does not use any
optimisation and is therefore quick and smoothly converges to a
fixed point in economic dynamics problems including value function
iteration. It also automatically gives the first two derivatives
of the spline and options for determining behaviour when evaluated
outside the interpolation domain.
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=schumaker
to link to this page.


{% extends 'base.html' %} {% block additional_head %} {% endblock %} {% block content %}
{{report_json}}
Report generated in {{report_time}} minutes.


{% extends 'core.html' %} {% load i18n userutils %} {% block htmltitle %}{% trans "PKI" %} | {{ block.super }}{% endblock %} {% block headertitle %}{% trans "PKI" %}{% endblock %} {% block content %}
{% blocktrans trimmed with user=target_user|full_name email=target_user.email %} The client certificate for {{ user }} has been created. It has been sent to {{ email }} per email. The passphrase is as follows. Please make sure to transmit the passphrase via a secure channel Do not send it via email! {% endblocktrans %}


One of any class member descriptor.
The MemberDesc is one of any of the class member descriptor types.


15th of February in the year 590 was an important one as Khosrow II was crowned king of Persia. About 1400 years later, the night of 15th of February in the year 2016 was also an important one as Litesense® was taken out to ensure that the streets of Ulu Pandan and Bukit Timah were safe for us to drive on, ride, cycle and walk along.
Results of the mission were visualised in Folium, a project “that makes it easy to visualize data that’s been manipulated in Python on an interactive Leaflet map”. In the map below, the
- green marker is the start point
- red marker is the end point
- different colours represent varying brightness levels (measured in lux)
- tiny black circles are pole identification numbers
Indicators for brightness level are
- 0 ≤ lux < 3 (darkest)
- 3 ≤ lux < 6 (darker)
- 6 ≤ lux < 10
- 10 ≤ lux < 20
- 20 ≤ lux < 40
- 40 ≤ lux < 60 (brighter)
- lux ≥ 60 (brightest)
Please feel free to interact with the map.
Findings
Areas with lower light uniformity:
All other roads were uniformly lit. Great job guys! You know who you are. =)


This class implements array of 3D vertices. More...
#include <CVertexArray.h>
Public Member Functions | |
| cVertexArray (const cVertexArrayOptions &a_options) | |
| ~cVertexArray () | |
| void | clear () |
| cVertexArrayPtr | copy () |
| int | newVertex () |
| int | newVertices (unsigned int a_numberOfVertices) |
| void | setLocalPos (const unsigned int a_vertexIndex, const double &a_x, const double &a_y, const double &a_z) |
| void | setLocalPos (const unsigned int a_vertexIndex, const cVector3d &a_pos) |
| void | translate (const unsigned int a_vertexIndex, const cVector3d &a_translation) |
| cVector3d | getLocalPos (const unsigned int a_vertexIndex) const |
| cVector3d | getGlobalPos (const unsigned int a_vertexIndex) const |
| void | setNormal (const unsigned int a_vertexIndex, const cVector3d &a_normal) |
| void | setNormal (const unsigned int a_vertexIndex, const double &a_x, const double &a_y, const double &a_z) |
| cVector3d | getNormal (const unsigned int a_vertexIndex) const |
| void | setTexCoord (const unsigned int a_vertexIndex, const cVector3d &a_texCoord) |
| void | setTexCoord (const unsigned int a_vertexIndex, const double &a_tx, const double &a_ty=0.0, const double &a_tz=0.0) |
| cVector3d | getTexCoord (const unsigned int a_vertexIndex) const |
| void | setColor (const unsigned int a_vertexIndex, const cColorf &a_color) |
| void | setColor (const unsigned int a_vertexIndex, const float &a_red, const float &a_green, const float &a_blue, const float &a_alpha=1.0) |
| void | setColor (const unsigned int a_vertexIndex, const cColorb &a_color) |
| cColorf | getColor (const unsigned int a_vertexIndex) const |
| void | setTangent (const unsigned int a_vertexIndex, const cVector3d &a_tangent) |
| void | setTangent (const unsigned int a_vertexIndex, const double &a_x, const double &a_y, const double &a_z) |
| cVector3d | getTangent (const unsigned int a_vertexIndex) const |
| void | setBitangent (const unsigned int a_vertexIndex, const cVector3d &a_bitangent) |
| void | setBitangent (const unsigned int a_vertexIndex, const double &a_x, const double &a_y, const double &a_z) |
| cVector3d | getBitangent (const unsigned int a_vertexIndex) const |
| void | setUserData (const unsigned int a_vertexIndex, const int a_userData) |
| int | getUserData (const unsigned int a_vertexIndex) const |
| void | computeGlobalPosition (const unsigned int a_vertexIndex, const cVector3d &a_globalPos, const cMatrix3d &a_globalRot) |
| unsigned int | getNumElements () const |
| bool | getUseNormalData () const |
| bool | getUseTexCoordData () const |
| bool | getUseColorData () const |
| bool | getUseTangentData () const |
| bool | getUseBitangentData () const |
| bool | getUseUserData () const |
| void | renderInitialize () |
| void | renderFinalize () |
| void | allocateData (const int a_numberOfVertices, const bool a_useNormalData, const bool a_useTexCoordData, const bool a_useColorData, const bool a_useTangentData, const bool a_useBitangentData, const bool a_useUserData) |
Static Public Member Functions | |
| static cVertexArrayPtr | create (const bool a_useNormalData, const bool a_useTexCoordData, const bool a_useColorData, const bool a_useTangentData, const bool a_useBitangentData, const bool a_useUserData) |
Public Attributes | |
| std::vector< cVector3d > | m_localPos |
| Local position of vertices. More... | |
| std::vector< cVector3d > | m_globalPos |
| Global position of vertices in world coordinates. More... | |
| std::vector< cVector3d > | m_normal |
| Surface normal of vertices. More... | |
| std::vector< cVector3d > | m_texCoord |
| Texture coordinate (U,V,W) of vertices. More... | |
| std::vector< cColorf > | m_color |
| Color of vertices. More... | |
| std::vector< cVector3d > | m_tangent |
| Surface tangent of vertices. More... | |
| std::vector< cVector3d > | m_bitangent |
| Surface bitangent of vertices. More... | |
| std::vector< int > | m_userData |
| User data of vertices. More... | |
| bool | m_flagPositionData |
| If true then position data has been modified. More... | |
| bool | m_flagNormalData |
| If true then normal data has been modified. More... | |
| bool | m_flagTexCoordData |
| If true then texture coordinate data has been modified. More... | |
| bool | m_flagColorData |
| If true then vertex color data has been modified. More... | |
| bool | m_flagTangentData |
| If true then surface tangent data has been modified. More... | |
| bool | m_flagBitangentData |
| If true then surface bitangent data has been modified. More... | |
| bool | m_flagUserData |
| If true then user data has been modified. More... | |
| bool | m_flagBufferResize |
| If true, then data buffer need to be updated in size. More... | |
| GLuint | m_positionBuffer |
| OpenGL Buffer for storing triangle indices. More... | |
| GLuint | m_normalBuffer |
| OpenGL Buffer for storing triangle indices. More... | |
| GLuint | m_texCoordBuffer |
| OpenGL Buffer for storing triangle indices. More... | |
| GLuint | m_colorBuffer |
| OpenGL Buffer for storing triangle indices. More... | |
| GLuint | m_tangentBuffer |
| OpenGL Buffer for storing triangle indices. More... | |
| GLuint | m_bitangentBuffer |
| OpenGL Buffer for storing triangle indices. More... | |
Protected Attributes | |
| unsigned int | m_numVertices |
| Number of vertices. More... | |
| bool | m_useNormalData |
| If true then normal data will be allocated for each new vertex. More... | |
| bool | m_useTexCoordData |
| If true then texture coordinate data will be allocated for each new vertex. More... | |
| bool | m_useColorData |
| If true then vertex color data will be allocated for each new vertex. More... | |
| bool | m_useTangentData |
| If true then surface tangent data will be allocated for each new vertex. More... | |
| bool | m_useBitangentData |
| If true then surface bitangent data will be allocated for each new vertex. More... | |
| bool | m_useUserData |
| If true then surface bitangent data will be allocated for each new vertex. More... | |
cVertexArray defines a an array of 3D vertices (points) that can include properties such as position, color, texture coordinate, and surface normals.
New vertices can be added to the array by calling newVertex() or newVertices(). Once points have been allocated, they cannot be removed, unless the entire array is cleared by calling clear().
The properties of each vertex can be modified by calling the appropriate methods and by passing the vertex index as argument with the associated data.
|
inline |
Constructor of cVertexArray. You may define which type of data this vertex array will store. By setting the flag, every time a new vertex is created, the associated data will be allocated and initialized.
| a_options | Data allocation options. |
|
inline |
Destructor of cVertexArray.
|
inlinestatic |
This method create an instance of cVertexArrayPtr. You may define which type of data this vertex array will store. By setting the flag, every time a new vertex is created, the associated data will be allocated and initialized.
| a_useNormalData | If true then normal data is allocated. |
| a_useTexCoordData | If true then texture coordinate data is allocated. |
| a_useColorData | If true then vertex color data is allocated. |
| a_useTangentData | If true then surface tangent data is allocated. |
| a_useBitangentData | If true then surface bitangent data is allocated. |
| a_useUserData | If true then user data is allocated. |
|
inline |
This method clears all vertex data.
|
inline |
This method creates copy of this vertex array.
|
inline |
This method creates a new vertex.
|
inline |
This method creates a number of new vertices.
| a_numberOfVertices | Number of vertices to create. |
|
inline |
This method sets the local position data for selected vertex.
| a_vertexIndex | Vertex index number. |
| a_x | X position value. |
| a_y | Y position value. |
| a_z | Z position value. |
|
inline |
This method sets the local position value for selected vertex.
| a_vertexIndex | Vertex index number. |
| a_pos | Local position of vertex. |
|
inline |
This method translates a selected vertex by defining a translation offset passed as argument.
| a_vertexIndex | Vertex index number. |
| a_translation | Translation offset. |
|
inline |
This method returns the local position for a selected vertex.
| a_vertexIndex | Vertex index number. |
|
inline |
This method returns the global position of a selected vertex. This value is only correct if the computeGlobalPositions() method has been called previously.
| a_vertexIndex | Vertex index number. |
|
inline |
This method sets the surface normal vector for selected vertex.
| a_vertexIndex | Vertex index. |
| a_normal | Normal vector. |
|
inline |
This method sets the surface normal vector for selected vertex.
| a_vertexIndex | Vertex index. |
| a_x | X component of normal. |
| a_y | Y component of normal. |
| a_z | Z component of normal. |
|
inline |
This method returns the surface normal vector for selected vertex.
| a_vertexIndex | Vertex index. |
|
inline |
This method sets the texture coordinate for selected vertex.
| a_vertexIndex | Vertex index. |
| a_texCoord | Texture coordinate. |
|
inline |
This method sets the texture coordinate for selected vertex by passing its coordinates as parameters.
| a_vertexIndex | Vertex index. |
| a_tx | X component of texture coordinate. |
| a_ty | Y component of texture coordinate. |
| a_tz | Z component of texture coordinate. |
|
inline |
This method returns the texture coordinate for a selected vertex.
| a_vertexIndex | Vertex index. |
|
inline |
This method set the color for a selected vertex.
| a_vertexIndex | Vertex index. |
| a_color | Color. |
|
inline |
This method set the color of a selected vertex by passing as argument the individual color components.
| a_vertexIndex | Vertex index. |
| a_red | Red component. |
| a_green | Green component. |
| a_blue | Blue component. |
| a_alpha | Alpha component. |
|
inline |
This method set color for selected vertex.
| a_vertexIndex | Vertex index. |
| a_color | Color. |
|
inline |
This method returns the color for a selected vertex.
| a_vertexIndex | Vertex index. |
|
inline |
This method sets the tangent vector for selected vertex.
| a_vertexIndex | Vertex index. |
| a_tangent | Tangent vector. |
|
inline |
This method sets the tangent vector for selected vertex.
| a_vertexIndex | Vertex index. |
| a_x | X component of tangent. |
| a_y | Y component of tangent. |
| a_z | Z component of tangent. |
|
inline |
This method returns the surface tangent for a selected vertex.
| a_vertexIndex | Vertex index. |
|
inline |
This method sets the bi-tangent vector for selected vertex.
| a_vertexIndex | Vertex index. |
| a_bitangent | Bi-tangent vector. |
|
inline |
This method sets the bi-tangent vector for selected vertex.
| a_vertexIndex | Vertex index. |
| a_x | X component of bi-tangent. |
| a_y | Y component of bi-tangent. |
| a_z | Z component of bi-tangent. |
|
inline |
This method returns the surface bitangent for selected vertex.
| a_vertexIndex | Vertex index. |
|
inline |
This method sets the user data field for selected vertex.
| a_vertexIndex | Vertex index. |
| a_userData | User data. |
|
inline |
This method returns the user data value for a selected vertex.
| a_vertexIndex | Vertex index. |
|
inline |
This method computes the global position of vertex given the global position and global rotation matrix of the parent object.
| a_vertexIndex | Index number of vertex. |
| a_globalPos | Global position vector of parent. |
| a_globalRot | Global rotation matrix of parent. |
|
inline |
This method returns the number of vertices allocated in this array.
|
inline |
This method checks if normal data is allocated for each vertex in this array.
|
inline |
This method check if texture coordinate data is allocated for each vertex in this array.
|
inline |
This method checks if color data is allocated for each vertex in this array.
|
inline |
This method checks if tangent data is allocated for each vertex in this array.
|
inline |
This method checks if bitangent data is allocated for each vertex in this array.
|
inline |
This method checks if user data is allocated for each vertex in this array.
|
inline |
This method allocates or updates all OpenGL buffers.
|
inline |
This method finalizes rendering by disabling all OpenGL buffers.
|
inline |
This method allocate data for vertex array.
| a_numberOfVertices | Number of new vertices to be allocated |
| a_useNormalData | If true then normal data is allocated. |
| a_useTexCoordData | If__true__ then texture coordinate data is allocated. |
| a_useColorData | If true then vertex color data is allocated. |
| a_useTangentData | If true then surface tangent data is allocated. |
| a_useBitangentData | If true then surface bitangent data is allocated. |
| a_useUserData | If true then user data data is allocated. |
| std::vector<cVector3d> chai3d::cVertexArray::m_localPos |
| std::vector<cVector3d> chai3d::cVertexArray::m_globalPos |
| std::vector<cVector3d> chai3d::cVertexArray::m_normal |
| std::vector<cVector3d> chai3d::cVertexArray::m_texCoord |
| std::vector<cColorf> chai3d::cVertexArray::m_color |
| std::vector<cVector3d> chai3d::cVertexArray::m_tangent |
| std::vector<cVector3d> chai3d::cVertexArray::m_bitangent |
| std::vector<int> chai3d::cVertexArray::m_userData |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| bool chai3d::cVertexArray::m_flagPositionData |
| bool chai3d::cVertexArray::m_flagNormalData |
| bool chai3d::cVertexArray::m_flagTexCoordData |
| bool chai3d::cVertexArray::m_flagColorData |
| bool chai3d::cVertexArray::m_flagTangentData |
| bool chai3d::cVertexArray::m_flagBitangentData |
| bool chai3d::cVertexArray::m_flagUserData |
| bool chai3d::cVertexArray::m_flagBufferResize |
| GLuint chai3d::cVertexArray::m_positionBuffer |
| GLuint chai3d::cVertexArray::m_normalBuffer |
| GLuint chai3d::cVertexArray::m_texCoordBuffer |
| GLuint chai3d::cVertexArray::m_colorBuffer |
| GLuint chai3d::cVertexArray::m_tangentBuffer |
| GLuint chai3d::cVertexArray::m_bitangentBuffer |


YALIM ERDEM - FRAME PLAYER
This assignment task renders sequences of the images and displays them as a video using with webserver and EventListeners for
You can also install it as an npm package from here.
For more information,
Go to Repo


Safari IT Books Language Constructs Functional Programming Haskell Safari IT Books Programming Programming Programming Bryan O'Sullivan Donald Bruce Stewart John Goerzen O'Reilly Media, Inc. Real World Haskell, 1st Edition12.2. Introducing ArraysBefore we continue, here are all of the imports that we will be using in the
remainder of this chapter: -- file: ch12/Barcode.hs
import Data.Array (Array(..), (!), bounds, elems, indices,
ixmap, listArray)
import Control.Applicative ((<$>))
import Control.Monad (forM_)
import Data.Char (digitToInt)
import Data.Ix (Ix(..))
import Data.List (foldl', group, sort, sortBy, tails)
import Data.Maybe (catMaybes, listToMaybe)
import Data.Ratio (Ratio)
import Data.Word (Word8)
import System.Environment (getArgs)
import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.Map as M
import Parse -- from chapter 11
The barcode encoding process can largely be table-driven,
in which we use small tables of bit patterns to decide how to encode each
digit. Haskell's bread-and-butter—data types, lists, and tuples—are not
well-suited to use for tables whose elements may be accessed randomly. A
list has to be traversed linearly to reach the kth
element. A tuple doesn't have this problem, but Haskell's type system
makes it difficult to write a function that takes a tuple and an element
offset and returns the element at that offset within the tuple. (We'll
explore why in the exercises that follow.) The usual data type for constant-time random access is of
course the array. Haskell provides several array data types. We'll thus
represent our encoding tables as arrays of strings. The simplest array type is in the Data.Array
module, which we're using here. This presents arrays that can
contain values of any Haskell type. Like other common Haskell types, these
arrays are immutable. An immutable array is
populated with values just once, when it is created. Its contents cannot
subsequently be modified. (The standard libraries also provide other array
types, some of which are mutable, but we won't cover those for a
while.) -- file: ch12/Barcode.hs
leftOddList = ["0001101", "0011001", "0010011", "0111101", "0100011",
"0110001", "0101111", "0111011", "0110111", "0001011"]
rightList = map complement <$> leftOddList
where complement '0' = '1'
complement '1' = '0'
leftEvenList = map reverse rightList
parityList = ["111111", "110100", "110010", "110001", "101100",
"100110", "100011", "101010", "101001", "100101"]
listToArray :: [a] -> Array Int a
listToArray xs = listArray (0,l-1) xs
where l = length xs
leftOddCodes, leftEvenCodes, rightCodes, parityCodes :: Array Int String
leftOddCodes = listToArray leftOddList
leftEvenCodes = listToArray leftEvenList
rightCodes = listToArray rightList
parityCodes = listToArray parityList
The Data.Array module's listArray function populates an array from a list. It takes as its first
parameter the bounds of the array to create; the second is the values with
which to populate it. An unusual feature of the Array type is that
its type is parameterized over both the data it contains and the index
type. For example, the type of a one-dimensional array of
String is Array Int String, but a
two-dimensional array would have the type Array (Int,Int)
String: ghci> :m +Data.Arrayghci> :type listArray
listArray :: (Ix i) => (i, i) -> [e] -> Array i e We can construct an array easily: ghci> listArray (0,2) "foo"
array (0,2) [(0,'f'),(1,'o'),(2,'o')]
Notice that we have to specify the lower and upper bounds
of the array. These bounds are inclusive, so an array from 0 to 2 has
elements 0, 1, and 2: ghci> listArray (0,3) [True,False,False,True,False]
array (0,3) [(0,True),(1,False),(2,False),(3,True)]
ghci> listArray (0,10) "too short"
array (0,10) [(0,'t'),(1,'o'),(2,'o'),(3,' '),(4,'s'),(5,'h'),(6,'o'),
(7,'r'),(8,'t'),(9,*** Exception: (Array.!): undefined array element Once an array is constructed, we can use the (!) operator to access its elements by index: ghci> let a = listArray (0,14) ['a'..]ghci> a ! 2
'c'
ghci> a ! 100
*** Exception: Error in array index Since the array construction function lets us specify the
bounds of an array, we don't have to use the zero-based array indexing
that is familiar to C programmers.  (-2)
'h' The index type can be any member of the Ix
type. This lets us use, for example, Char as the index
type: ghci> let a = listArray ('a', 'h') [97..]ghci> a ! 'e'
101 To create a higher-dimensioned array, we use a tuple of
Ix instances as the index type. The
Prelude makes tuples of up to five elements members of
the Ix class. To illustrate, here's a small three-dimensional
array: ghci> let a = listArray ((0,0,0), (9,9,9)) [0..]ghci> a ! (4,3,7)
437 12.2.1. Arrays and LazinessThe list that we use to populate the array must contain at least as
many elements as are in the array. If we do not provide enough elements,
we'll get an error at runtime. When the error occurs depends on the
nature of the array. Here, we are using an array type that is nonstrict in
its elements. If we provide a list of three values to an array that we
specify as containing more than three elements, the remaining elements
will undefined. We will not get an error unless we access an element
beyond the third: ghci> let a = listArray (0,5) "bar"ghci> a ! 2
'r'
ghci> a ! 4
*** Exception: (Array.!): undefined array element Haskell also provides strict arrays, which behave
differently. We will discuss the tradeoffs between the two kinds of
arrays in Section 26.3.1. 12.2.2. Folding over ArraysThe bounds
function returns a tuple describing the bounds that we used to
create the array. The indices
function returns a list of every index. We can use these to define some
useful folds, since the Data.Array module doesn't define any fold functions itself: -- file: ch12/Barcode.hs
-- | Strict left fold, similar to foldl' on lists.
foldA :: Ix k => (a -> b -> a) -> a -> Array k b -> a
foldA f s a = go s (indices a)
where go s (j:js) = let s' = f s (a ! j)
in s' `seq` go s' js
go s _ = s
-- | Strict left fold using the first element of the array as its
-- starting value, similar to foldl1 on lists.
foldA1 :: Ix k => (a -> a -> a) -> Array k a -> a
foldA1 f a = foldA f (a ! fst (bounds a)) a
You might wonder why the array modules don't already
provide such useful things as folding functions. There are some obvious
correspondences between a one-dimensional array and a list. For
instance, there are only two natural ways in which we can fold
sequentially: left-to-right and right-to-left. Additionally, we can only
fold over one element at a time. This does not translate even to two-dimensional arrays.
First of all, there are several kinds of fold that make
sense. We might still want to fold over single elements, but we now have
the possibility of folding over rows or columns, too. On top of this,
for element-at-a-time folding, there are no longer just two sequences
for traversal. In other words, for two-dimensional arrays, there are
enough permutations of possibly useful behavior that there aren't many
compelling reasons to choose a handful for a standard library. This
problem is only compounded for higher dimensions, so it's best to let
developers write folds that suit the needs of their applications. As we
can see from our examples, this is not hard to do. 12.2.3. Modifying Array ElementsWhile "modification" functions exist for immutable arrays, they are not very
practical. For example, the accum
function takes an array and a list of (index, value)
pairs and returns a new array with the values at the given indices
replaced. Since arrays are immutable, modifying even one element
requires copying the entire array. This quickly becomes prohibitively
expensive on arrays of even modest size. Another array type, DiffArray in the
Data.Array.Diff module, attempts to offset the cost of small modifications by
storing deltas between successive versions of an array. Unfortunately,
it is not implemented efficiently at the time of this writing, and it is
currently too slow to be of practical use. NOTE
It is in fact possible to modify
an array efficiently in Haskell, using the ST monad.
We'll return to this subject in Chapter 26. |


Plot Aerocet sample D3JS
2014-11-16
####Plot aerocet data with D3 JS scrip####
- Based on this and its source code.
- One index.html file combines the code for the meteor web application. Web map marker codes are in the file JS drawMap.js.
- The index.html was edited to remove the CHART in line 14 to 19 contains

Year of Impact

Mass (g)

IN drawMap.js, following lines were removed
function renderAll(){ chart.each(render); var filterArray = cartoDbIds.all(); filterArray.forEach(function(d, i){ if (d.value != lastFilterArray[i]){ lastFilterArray[i] = d.value; d3.select("#id" + d.key).transition().duration(500) .attr("r", d.value == 1 ? 2*metorScale(metors[i].mass) : 0) .transition().delay(550).duration(500) .attr("r", d.value == 1 ? metorScale(metors[i].mass) : 0); } }) d3.select("#active").text(all.value()); }
Also removed line from 129 tp 159 related with cahrts
To make python to print \ backlash charecter based on this
Instead of json, the meteors web app is reading a csv file and getting data for marker position such as the lat and long. The drawMap.js and the l function
queue()
contains the codes for functionalities. Such as referring the csv file location, data parsing and drawing all the related process, such as point-making in d3 (by lat-long parsing) and giving other info in the event of marker click and pop up box.Made different attempts such as trying different maps, shapefiles for cbe map visualization in d3 canvas
The first attempt is with recently created
cbe_webmap.shp
with all the wards and village converted into topojson by the following command
ogr2ogr -f GeoJSON cbecity.json cbewebmapcity.shp topojson -o cbecitytopo.json cbe_city.json
However, this was visualized in canvas as haphazard rectangular and scribbled image, for a surprise.
1. So it is doubted the problem with shapefile or conversion process. The letsmake map
tutorial shapefile converted into toposjon with the following command
ogr2ogr -f GeoJSON world.json ne10madmin0map_subunits.shp topojson -o worldT.json world.json
Replaced the meteors web app toposjon with just created topojson and edited the drawmap.js care this change. The result was perfect visualization of the added topojson in D3 canvas. Indicating the problem is related to shapefile. 1. Using QGIS, a new shapefile was created from the file ne10madmin0mapsubunits.shp. This file named as testwebmapA1.shp was converted into topjson with command
ogr2ogr -f GeoJSON testA1.json test_webmapA1.shp
topojson -o testtopoA1.json testA1.json
This file was again viewed correctly in the canvas. Reassures that the problem is indeed with shapefile.
1. Suspected that the problem might be of wrong projection. Opened the world file and the cbe_webmap.shp and created a new file tracing it. This was testtopoA3.json
made into viewed in the canvas of web app but having the problem of zooming.
1. Though changing the values in .scale of var proj and .scaleExtent of var zoom, the zoom is working for a single time and then gets stuck.
1. Created a new shapefile as of past test for solving the problem test_webmapA2.shp
and converted into json by
ogr2ogr -f GeoJSON testwebA2.json test_webmapA2.shp topojson -o testtopoA2.json testwebA2.json
Which gets a view in canvas with zoom and drag functionality. However, the zoom is still stuck to a maximum limit. The link gives more information on D3 zoom functionality.. It is found that the command .scaleExtent([height*.33, 4 * height])
is indicating minimum and maximum zooming functionality. So changing that make more control of map viewing and thus solved the problem of cbe map view in d3 canvas.
1. The problem related to zoom is simple arithmetic. To get the maximum zoom value, it has to be above the .scale(180000)
, so if the height is 500, the scale extent has to be 180000/500*height or above.
1. With this solution, the digitizing cbe map testtopoA3.json
in the web app perfectly gets viewed. Proving once again, one day of reading documentation is better than one week of googling.
1. So the cbe_map overlay with world.shp file was traced with keeping the snapping option to both the shapefiles. Not giving this 100 pixels units for snapping option eiher of it didn’t made snapping option true with turn on enabling topological editing and enable snapping on an intersection.
1. This file was converted into topojson by the following command
ogr2ogr -f GeoJSON cbe_webmap.json cbe_webmap_D3A1.shp
topojson -o cbe_webmapT.json cbe_webmap.json
- The file got correctly visualized in d3 canvas by giving
.scale(150000)
,.center(76.9715,11.0142)
,.rotate([0,0]);
and.scaleExtent([height*360, 560 * height])
. - Further to this the data source, the file fell.csv file was edited to consider the Aerocet data. Beforehand the Aerocet data was made shorten by removing the unnecessary column by following commands. ``` import os ad=[] for file in os.listdir(‘/home/AerocetDATA/Octsample/‘): if file.endswith(“M.csv”): ad.append(file)
for file in os.listdir(‘/home/AerocetDATA/Octsample/‘): if file.endswith(“M_N.csv”): ad.append(file)
for i in ad: db=pd.readcsv(i) db1=db[[‘Time’,‘long’,‘lat’,‘PM2.5(ug/m3)’,‘PM10(ug/m3)’]] db1.tocsv(‘web_‘+i)
There was need of minor change in the function ready(),
```.attr("r", function(d){return metorScale(d.mass);})``` where it takes up the mass_g column of fell.csv for scaling the point marker size.
###Adding the functionality of drop down to choose date###
1. This functionality is required to visualize the multiple date Aerocet readings saved in different csv file. For this made a first attempt ```webmap_A1``` based on [this](http://fiddle.jshell.net/7KJC7/2/) and second attempt ``was`webmap_A2``` made with [this](http://fiddle.jshell.net/7KJC7/2/) sample code.
1. The attempted functionality was based on drop down select to change the CSV file quired in queue function (the lines 51-55 of drawMap.js) are as follows
queue() .defer(d3.json, “worldTopo.json”) .defer(d3.csv, csv) .defer(d3.json, “pics.json”) .await(ready);
Getting the csv variable value in attempt ```webmap_A1``` by
var csv = function() { var selectedValue = d3.event.target.value; console.log(selectedValue) } d3.select(“#select-list”).on(“change”, csv); .defer(d3.csv, selectedValue)
Attempt got ended with the error of no CSV file. So made the second attempt ```webmap_A2``` by
d3.select('#select-list')
.on('change', function() {
var csv = eval(d3.select(this).property('value'));
console.log(csv)
});
this attempt was ended with getting of file name with out csv extension based on [this](http://stackoverflow.com/questions/24193593/d3-how-to-change-dataset-based-on-drop-down-box-selection), such as ```web_08102014M.csv```
1. Then it is found that changing csv file is way around method for the drop down requirement. There is a native d3 method for this requirement named as object constancy. Examples are [this](http://bl.ocks.org/nsonnad/4175202), [this1](https://github.com/mbostock/bost.ocks.org/blob/gh-pages/mike/constancy/index.html) and [this2](http://www.delimited.io/blog/2013/11/8/object-constancy-in-d3)
1. Based on [this](http://bl.ocks.org/nsonnad/4175202) example the csv data filtering by column/ time is made as follows
rawMetors = csv; var nested = d3.nest() .key(function(d) { return d.Time; }) .map(rawMetors)
var series = menu.property("value");
// only retrieve data from the selected series, using the nest we just created
data = nested[series];
console.log(JSON.stringify(data));
metors = [];
data.forEach(function(d){
d.mass = +d.PM25;
d.year = +d.year;
d.id = +d.cartodb_id;
metors.push(d);
});
1. With the bove code it can filter csv file with time, which is referen cein drop down element
1. So now to create data for the map, stacking all the csv fileinto one csv file by below code
import os ad=[] for file in os.listdir(‘/home/swl-sacon-dst/Documents/GISE2013/LAB/AerocetDATA/Oct_sample/‘): if file.startswith(“web”): ad.append(file)
#concatenate pandas dataframe and then convertinginto single csv file for i in ad: db0=pd.DataFrame() db=pd.readcsv(i) db2=pd.concat([db0, ], axis=0) db2.tocsv(‘web_aerocetdata.csv’) #this is not working, lets try based on this
frame = pd.DataFrame() list = [] for files in db: df = pd.readcsv(join(directory,files),indexcol=None, header=0) list.append(df) frame = pd.concat(list) #this also not working #based on this for i in ad d = concat([readcsv(f, indexcol=0, header=None, axis=1) for f in ad], keys=files) for i in ad d = pd.concat([(pd.readcsv(i, indexcol=0, header=0).T) for f in i], keys=i) #this also not working neds in some error
#
ad1=[]
for i in ad:
db=pd.read_csv(i)
db2=df23=pd.concat([Series(row[1], row[0].split(‘,’)) for , row in db.iterrows()]).resetindex()
ad1.append(db2)
#not working
#
names = pd.DataFrame()
for i in ad:
frame = pd.readcsv(i)
names = pd.concat(names, frame, ignoreindex=True)
#Not working
#
db = pd.DataFrame()
for i in ad:
frame = pd.readcsv(i)
db = db.append(frame, ignoreindex=True)
#thjis is working
db2=db[[‘Time’,‘lat’,‘long’,‘PM10(ug/m3)’,‘PM2.5(ug/m3)’]]
db3=pd.DataFrame(db2.Time.str.split(” “).tolist())
T1 = pd.merge(db2,db3, on=db2.index, how=‘outer’)1. The
- with the above file, a new column was added to give the size of the pointer in the map as a circle. The title of the column also has to be changed to plot correctly the map. Which makes the points to be plotted in the map but with a problem. As the points selected by drop down is not getting removed, and the next selection is overlaid with old selection points.
- The change function in BRICS app can used to address the problem. However, the difficulty persists in the json queue.
- The json queue also not usable for the current case. The extensive data pipeline is to be the underlying problem with this rendering of whole objects in canvas.
- Based on this example there is an alternative using the slider and changing/filtering the csv file.
- The solution is based on making the d3.js slider as an object/number generator. In which each slider operation gives a new number, and so the date in the aerocet data gets filtered.
- To edit the web aerocet file for changing the date formate
import pandas as pd db=pd.readcsv(‘webaerocst.csv’) db[‘Date2’]=pd.to_datetime(db.Date,format=‘%Y-%m-%d’) db[‘Date3’] = db[‘Date2’].map(lambda x: x.strftime(‘%Y%m%d’)) #to get unique values out of pandas column for dates db22=pd.Series(db.Date3.values.ravel()).unique()
- The data filtering in slider can coded as per below
$(“#scale”).slider({ min: 20141008, // there are 6 days of sampling 0 is all events max: 20141023, value: 20141008, //default slider value step: 1, // step is the allow increments the slider can move. 1 = one day slide: function(event, ui) {
var months = [0,20141008, 20141021, 20141022, 20141023, 20141017,20141014, 20141020, 20141011];
// handle case where slider at zero = show all sampling if(ui.value == 0) { // highlight all sampling points d3.selectAll(‘.samplingpoints’) .style(“display”,“block”);
// change the slider text to appropriate date d3.select(“#slidertext”) .text(‘Attacks During 01/2004 - 12/2009’);
}else{
// dim all explosion points d3.selectAll(‘.samplingpoints’) .style(“display”,“none”);
// get and format current slider value $tempvalue = “+months[ui.value]; //look up which month the slider value corresponds to and convert to a string for printing $tempvalueclass = ‘._‘+$tempvalue; //take month and convert to a class
// highlight all samplingpoints in the selected month by class d3.selectAll($tempvalueclass) .style(“display”,“block”);
// change the slider text to appropriate date d3.select(“#slidertext”) .text(‘sampling During ‘+$tempvalue.substring(4,6)+’/‘+$tempvalue.substring(0,4));
}//endelse
} });
- Usgae of this example can’t be reproduable with the current web app based on metero web app, it seems it is due to different libraries used and projection system used in these two d3.js based web apps. So this attempt named as meteors-master_A5 is left as such due to this lock.
- A new effort by adding slider in the native meteors app and tried with log working. The log would give clues to learn the needed functionality.
- Changing of libraries in the native meteors app for slider is not working. So tried with changing native slider app with libraries of meteors and it is working. So copied meteors app content in it.
- Below code defines various functions needed to visualize topojson.
var w = 1200; var h = 500;
var xy = d3.geo.mercator() .center([76.9715,11.0100]) .scale(145000) .rotate([0,0]);
var path = d3.geo.path() .projection(xy);
var zoom = d3.behavior.zoom() .translate(xy.translate()) .scale(xy.scale()) .scaleExtent([h*290, 645 * h]) .on(“zoom”, zoom);
var svg = d3.select(“#graph”).append(“svg”) .attr(“width”, w) .attr(“height”, h) .call(zoom);
function zoom() { xy.translate(d3.event.translate).scale(d3.event.scale); svg.selectAll(“path”).attr(“d”, path); circles .attr(“cx”, function(d){return xy([d.long, d.lat])[0];}) .attr(“cy”, function(d){return xy([d.long, d.lat])[1];}); }
var borders = svg.append(“g”); var states = svg.append(“svg:g”) .attr(“id”, “states”);
var circles = svg.append(“svg:g”) .attr(“id”, “circles”);
var labels = svg.append(“svg:g”) .attr(“id”, “labels”);
d3.json(“cbewebmapT.json”, function(error, topology) { borders.selectAll(“path”) .data(topojson.object(topology, topology.objects.cbewebmap) .geometries) .enter() .append(“path”) .attr(“d”, path) .attr(“class”, “border”) });
- Moreover, the css also has to be changed. Otherwise, the map gets drawn with black fill color. The path has to be defined in css as it is important in the case of topojson.
- Slide change for data change
- reflect the slider change in data query of canvas drawing element.
It is complicated to reuse js scripts already written. Basics of what; line what behavior it exhibits has to be known to change a single line in it. So list what are all required in the app. One try with slider app, another with meteros app ###with slider app
- plot cbe map(it is done in meteors-master_A7 with slider app)
- plot the sampling points
- give tool tip info of pollution sampled
- change the date with slider or drop down box ###with meteros app
- plot the sampling points(done with meteros app)
- give tool tip info of pollution sampled (done with metros app)
- change the date with drop down box(it is not working)
The meteros app can be edited as of slider app, which is more simple and understandable for data filter with the slider option.
meteors-master_A9 is doing that- first removing usage of queue library in the app. Then giving the functionality to view the map and get the csv data into it plot it, then have the feature of zooming, slider data change and tooltip info view.
- With attempt 1 in the drwamap.js of meteors-master_A9, it was achieved to view the map, get the csv data and plot it
- with attemp 3, it is achieved zooming functionality
- with attempt 4, achieved slider view in the web app, it can’t usable with custom dates, the alternative is to go with drop down box only. The library used for the slider is a custom js named d3.slider.js.
- with attempt 5, achieved slider functionality of data filtering by slider movment the description of all the steps carried ouyt is given in the file of drawMap.js of meteors-master_A9.
The last attempt gives learning on the working of d3.js based web app. It consists of three components .
- view map
- plot the sampling point
- refresh the sampling point based on the date filter. The web app contains three components for above functionality, all are in the main js file. This file contains three sections, one global variable declaration section, and two is file processing section which does draw the map(json and csv file), three is the replotting section related with filter tool slider and its associated redraw function.
The filtering carried out in the last attempt has to be improved to include the normal csv.
This attempt will be named as meteors-master_A10 and dealt with drop down functionality and redraw functionality with drop down box using the remaining one and second section as such.


Beta This is a test version of the layout of this page. Take the survey to help us improve it
Correspondence
Issues of a news bulletin sent to schools, local authorities and other partners who work with data related to children, education and schools.
Issues of a regular series of bulletins on data-related developments and events sent to schools, local authorities and other partners during 2013.
The ICES bulletin was previously known as the DSP bulletin.
You can find earlier issues of the ICES bulletin on the National Archives website . Note: the search function is not available on archived content so please use the filters on the left of each page.