-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Z-zag time series plots #3212
Comments
Thanks for the post. Can you please include a minimal example (including the portion defining the data)? |
… On Mon, 2 Oct 2023 at 14:05, Christopher Davis ***@***.***> wrote:
Thanks for the post. Can you please include a minimal example (including
the portion defining the data)?
—
Reply to this email directly, view it on GitHub
<#3212 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGZLVHOFVKCLXLM4PMSRNLX5K3ZFAVCNFSM6AAAAAA5O7V252VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBSHE3TSMRUGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Good morning,
I hope you're well. I'm enjoying Voltaire and seeing what I can do with
iit.
Here's another example of odd plots. Not sure why. There is another quirk
with a chart that I've attached on obesity-related hospital admissions.
Sometimes you get that and when the chart loads, the area defaults to North
East. However, if you click to another area and then click back it shows
the right results.
[image: image.png]
This came from finding data that that the number of these admissions have
risen from 300,000 in 2013 to 700,000 in 2019 (see top left). The second
chart shows that around 2/3 of women are likely to be admitted than men and
then I have a regional breakdown on the right.
They are all really quite straightforward and Altair makes it easy to say
switch the gender chart to the pie chart that has a hole in it.
[image: image.png]
I have one question about what is supposed to be the big visual for the
data geeks (It is an attached in HTML). Some of the regions have a lot of
local authorities and that means can difficult to see trends.
How do do you make every line grey and bring it it up as red if you cross
it or at least one of the points? I've seen it done but for the life of me
can't get it to work. A simple workaround is to increase the sizes of the
circles, I guess, but I don't know how to write the condition to highlight
a line as red.
And I'm guessing this is beyond the scope of the project, but would it be
possible to create a feature to build on the back of the | and &
functionality which would allow the creation of a simple HTML text box
(Chart). I did try looking at the HTML of this project but suspect I'd
break it if I tried to work it out myself.
Anyway, thank you for keeping the project going. The hardest part of my
project was cleaning the data, rather than creating largely through Altair.
Kind regards.
David Elks
…On Mon, 2 Oct 2023 at 14:05, Christopher Davis ***@***.***> wrote:
Thanks for the post. Can you please include a minimal example (including
the portion defining the data)?
—
Reply to this email directly, view it on GitHub
<#3212 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGZLVHOFVKCLXLM4PMSRNLX5K3ZFAVCNFSM6AAAAAA5O7V252VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBSHE3TSMRUGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm loving the homophone of Voltaire to Altair! Regarding your original question in SO: df = pd.DataFrame(
{
"year": [2014, 2015, 2016, 2017, 2018, 2019],
"admissions": [200, 300, 450, 500, 700, 900],
}
)
df.year = df.year.astype(str) # <---
alt.Chart(df).mark_line().encode(alt.X("year:T"), alt.Y("admissions:Q")) See also
I think this issue is resolved. Closing this issue for now. |
I'm not sure this is a bug report but I often seem to have what I call a zig-zag plot while trying plot time series
Probably best described with a question on Stackoverflow - the question
Please follow these steps to make it more efficient to solve your issue:
vega_datasets
.The text was updated successfully, but these errors were encountered: